In a deleted
duplicate thread,
rmandel00 asks:
The published strategy uses signals from two indicators depending on the volatility switch, MA when in trending mode and RSI when not in trending mode.
According to the TASC write up of this program the following conditions for trend mode exist:
Entry rules: If volatility switch is in trend mode, buy at market next bar when today's close crosses above the 10-day simple moving average of close price
Exit rules: If volatility switch is in trend mode, sell at market next bar when today's close crosses below the 10-day simple moving average of close price
However according to the code the Sell signal occurs when the close crosses over the SMA signal.
CODE:
Please log in to see this code.
The Buy signal also results from a CrossOver of the Close with the SMA:
CODE:
Please log in to see this code.
I played with these signals to see what yielded the best return over a 7 year period for the SPY and found the following:
Buy Sell Profit Per BarOver Over 2.93
Over Under 1.89
Under Under 6.94
Under Over 4.83
The second condition would be a trend following condition where you go long when the close crosses above the moving average and close the position when it drops below it. This yields the worst return per bar as well as the lowest profit factor and total return in RAW mode. The best return results from buying and selling the position when the the close crosses below the MA for both cases. This strategy still allows for a sell using the RSI exit as well.
RichMan