Click here to Login





                                                   How can I loop/iterate over a parameter list?

  0

0
Aditya Jagirdar
2019-06-23 23:44:06


To a given method, say ref(close, 10), is there anyway to iterate this method over a range of values for the parameter.

For example, I would like to do something like:

for(i=0; i<20; i++) {

x = ref(close, i)
...
...
}



QuantShare
2019-06-26 09:46:38

  0

You need to create a custom function for this. You can then develop your functions using C# (Tools -> Create Functions)
QS language is a vector-based language, any variable references a vector/array.



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
Average Year over Year Indicator
How far are the close prices from the support line
Year over Year Chart Indicator
Highest and Lowest value over a dynamic period
Stock Correlation with its Industry - Change over time

How-to Lessons
How to draw distances on a chart?
How to display notes/commentaries on a chart
How to get trading orders from a portfolio programmatically
How to add a trading indicator to a chart
How to calculate the average of a time series using the money man...

Related Forum Threads
How can I set Log Scale charts?
How can I see charts with logarithmic scale on y-axis?
Can not move a square lying over a line
How can I incorporate earnings release data into my backtests scr...
How can I view signals rejected by the simulator?

Blog Posts
How to Create a Custom Real-Time Table using QS Trading Software
Let me Show You How to Create Hundreds of Profitable Trading Syst...
Learn How to Create Your Own Technical Analysis Indicators
How to Backtest Each Stock or Asset Individually
How to combine long, short and custom portfolio strategies within...









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 2019 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.