The per-symbol backtest/optimization in this blog is an extremely useful feature .. however, it's tedious to go through 3 steps each time before backtesting/optimization -
a) set up a file with the symbol list on the hard drive,
b) modify the file-name in the SymbolIndex function
c) copy/paste the list as a Custom list of symbols in the trading syste, http://www.quantshare.com/sa-502-how-to-backtest-each-stock-or-asset-individually
1) How can we modify the SymbolIndex function to grab the list dynamically from the Symbol List set up in the trading system? That would obviate all 3 steps
2) If that's not possible, how do we modify SymbolIndex function so we can pass the file-name as a parameter in the trading system (vs having to go through step b above)?
1) How can we modify the SymbolIndex function to grab the list dynamically from the Symbol List set up in the trading system? That would obviate all 3 steps
This is not possible as the trading indicator has no access to the trading system.
2) If that's not possible, how do we modify SymbolIndex function so we can pass the file-name as a parameter in the trading system (vs having to go through step b above)?
You just need to open the function using (Tools -> Create functions) then click on "Add a parameter" and update the parameter type to "string"
Say you added a parameter whose name is "file". After that you must replace:
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.