Hi Eugene, I would like to know, how many symbols in a certain dataset have a close-price above SMA(200) - plotted as DataSeries in percentage terms. With index-lab it's easy to create. But I would prefer to code and implement the code in my strategy. Using foreach could be the right way. But this is all I know. Do you have some code snippets for me?
Thank you very much.
Best
Niels
Size:
Color:
Hi Niels,
You're right, it's easy in Index-Lab to create and to refer to that index in Wealth-Lab via GetExternalSymbol. Not sure why you'd avoid I-L.
Nonetheless, you will find such code snippet right in the QuickRef > DataSetSymbols Property. It's exactly what you're looking for.
Size:
Color:
Hi Eugene,
Thank you. I didn't know that you can refer to Index-Lab via GetExternalSymbol. But the lookback-period would be fix then, wouldn't it?
Size:
Color:
Please refer to the User Guide. Under Index-Lab® > Using Indexes there's a short code sample.
Size:
Color:
Okay, but how to control the lookback period or other parameter?
Size:
Color:
You're right, the lookback period (or any other params of an I-L index) is fixed in this case. So the QuickRef sample code is the way to go in case you want to modify them interactively or in Strategy code.
Size:
Color: