Slightly complex entry condition

invsto

invsto

New member
VIP
TDLR version: I don't want to use crossover (MA1, MA2) and MA2> MA3 as a entry signal but instead use some thing like (MA1> MA2) and (MA2> MA3)

Details:
Most often strategies use have some kind of crossover for entries which is slightly easier to script.

Suppose I have 3 EMAs 10, 20 and 30.
Condition 1: EMA_10 crosses over EMA_20
Added filter: EMA_20 > EMA_30
Now, Condition 1 may happen before EMA_20 > EMA_30 but I only want to consider the candle after (EMA_20 > EMA_30) as the entry criteria, by this time the crossover may already have happened a few candles ago

One way of doing is using (EMA_10 > EMA_20) and (EMA_20 > EMA_30) instead of crossover(EMA_10, EMA_20) and (EMA_20 > EMA_30).

However, if I plot the above with arrows it will plot ALL candles where (EMA_10 > EMA_20) and (EMA_20 > EMA_30) instead I would want only the first candle which is the entry criteria.
 

Similar threads

Top