if ((SMA(Fast)[0] > SMA(Slow)[0]) && (StochRSI(14)[0] >= 0.8)&& wasLong == false)
{
EnterLong(DefaultQuantity, "LongSMAEnter");
wasLong = true;
}
if ((SMA(Fast)[0] < SMA(Slow)[0])&& wasLong == true)
{
ExitLong("ExitLong", "LongSMAEnter");
wasLong = false;
}
elseif ((SMA(Fast)[0] < SMA(Slow)[0]) && (StochRSI(14)[0] <= 0.2)&& wasLong == true)
{
EnterShort(DefaultQuantity, "ShortSMAEnter");
wasLong = false;
}
if ((SMA(Fast)[0] > SMA(Slow)[0])&& wasLong == false)
{
ExitShort("ExitShort", "ShortSMAEnter");
wasLong = true;
}

Comment