Have a limited programming ability but that said I will layout my idea and maybe you can point me to an example or two.
Based on the Value Line Index (VAY on Fidelity)
If Vay close > VAY wma(30) AND VAY dpo > 0 considered as an Uptrend signal
Else it would be a Downtrend signal
One other signal would be to note if this is a trend reversal by comparing to previous trading day condition:
Perhaps something like:
CODE:
Please log in to see this code.
Now based on that signal:
1. Uptrend I would like to execute a certain strategy against a certain dataset.
ie Active Trader 2012-12 WLMA with dataset based on SP 500
2. Dntrend ie Active Trader 2012-12 WLMA with a different dataset based on Contra ETF's
So in essence its using the same strategy but two different datasets ( I don't know how to specify in the strategy the two datasets to choose from.)
3. If trend is changing to sell all shares next day prior to buying into the next trend.
I tried to review several existing strategies but none seem to accomplish what I want.
My struggle seems to be with incorporating the VAY symbol to determine the trend in with the loop for the dataset.