Condition 2 is not working properly when I reference BarsArray[1]. If I delete the following part of the script:
(this.BarsSinceEntry() > 40 || this.BarsSinceEntry() == -1 ) it will then work fine.
How do I include the BarsSinceEntry script so that the 2nd Condition works properly?
// Condition set 1
if ((EMA(14 [0]>RMV(BarsArray[2]).Sup[1] ) && (CrossAbove(EMA(14), EMA(62), 1)))
{EnterLong(DefaultQuantity, "EnterLong");
}
// Condition set 2
if ((TSI((BarsArray[1]),29, 40)[1] > -30 && (this.BarsSinceEntry() > 40 || this.BarsSinceEntry() == -1 ) && (CrossAbove(EMA(6), FedIndicator().P1, 1))))
{EnterLong(DefaultQuantity, "EnterLong");}
Thank you,

Comment