What did you have the stoplosses set to in your backtest?
@BenTen Here is the backtest code for this strategy
SPY 90 Day 1 Hr Time Frame Results:Code:
input agg = AggregationPeriod.FIFTEEN_MIN; input TradeSize = 100; input fastLength = 19; input slowLength = 39; def c = close(period = agg); Def Value = ExpAverage(c, fastLength) - ExpAverage(c, slowLength); def B = Value < 0 and Value > 0; def S = Value > 0 and Value < 0 ; AddOrder(OrderType.BUY_AUTO, condition = B, price = open[-1], TradeSize, tickcolor = Color. GREEN, arrowcolor = Color.GREEN); AddOrder(OrderType.SELL_AUTO, condition = S, price = open[-1], TradeSize, tickcolor = Color.RED, arrowcolor = Color.RED);
Max trade P/L: $964.00
Total P/L: $723.98
Total order(s): 12