I have a strategy when Ema cross above Sma and Sma rising enter long and vice versa.
The problem is, when Ema cross above Sma and Sma not rising, nothing happens (is normal), but if Ema stay above Sma and Sma is starting to rising i want my strategy to start and get me long fill. Is any way to do this?
Thank you in advance.
This is my strategy
// Condition set 1
if (CrossAbove(SMA(Ema), SMA(Sma), 1)
&& Rising(SMA(Sma)))
{
EnterLong(DefaultQuantity, "");
SetStopLoss("", CalculationMode.Ticks, StopLoss, false);
}
// Condition set 2
if (CrossBelow(SMA(Ema), SMA(Sma), 1)
&& Falling(SMA(Sma)))
{
EnterShort(DefaultQuantity, "");
SetStopLoss("", CalculationMode.Ticks, StopLoss, false);
}
Comment