Click here to Login





                                                   Learning QS

  0

0
Juliettpapa
2011-04-26 10:15:21


How can I use ATR (average true range) when programming an indicator?
Is it possible or not?

http://screencast.com/t/bp0ETARRMikf




QuantShare
2011-04-26 10:30:39

  0

Best Answer
Yes, there are two ways:

1)

VectorD d1 = TA.Atr(stperiod);

2) // This uses the vector-based language

QSFormula formula = cFunctions.CreateFormula("a = atr(period1);");
formula.SetParameter("period1", stperiod);
formula.Compile();
VectorD d2 = formula.GetVectorDouble("a");



QuantShare
2011-04-26 10:40:29

  0

Note that your function must assign values to the variable "result". (Example: result[i] = _valOut; )
(you are using "return")



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Tweet Sentiment Index for the Forex and Stock Market
NSE Board Meetings
Dave's New System - DNS
NYSE - Round-Lot Share Volume
Z-Score (Standard Score)

How-to Lessons
How to create a correlation matrix of several securities
How to use a custom drawing tool
How to create trading rules based on Put and Call volume data
How to automate the data downloading process
How to quickly add several positions to your portfolio

Related Forum Threads
Viewing qsa files as Learning Tool
Learning to program QuantShare - how to begin
Genetic Algorithm (GA) vs Population-Based Incremental Learning (...
Percent Rank Function Needed
Buy/Sell order types w/Simulator

Blog Posts
How to Optimize a Trading System with Thousands of Billions of Co...
Aspiring Forex Traders Should Consider Upgrading Their Trading So...
Synchronize Buy/Sell List of Rules in the Trading System Optimize...
Stock Market Prediction with QuantShare
Stock Market Prediction









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.