I ned help to code 2 EMA crossing with candle between the EMAs.
-
Hello Guys,
can somone help me to code the following?- After crossing the fast EMA from below the slow EMA. The fast EMA is above the slow EMA AND the open price of the actual candle is between the fast and the slow EMA AND the price of the actual candle closes above the fast EMA.
- After crossing the fast EMA form above the slow EMA. The fast EMA is below the slow EMA AND the open price of the actual candle ist between the fast and the slow EMA AND the price closes below the fast EMA.
THX for your help.
-
@spanier The key for that is using the correct candle ID on each condition:
-
I am still having trouble triggering a buy order when candle 1 opens within the fast (red) and slow (black) EMA and closes above the fast (red) EMA, as seen in the attached screenshot. How can I insert a screenshot here?
-
I am still having trouble triggering a buy order when candle 1 opens within the fast (red) and slow (black) EMA and closes above the fast (red) EMA, as seen in the attached screenshot. How can I insert a screenshot here?
-
Help, how can I delete my double post? I have no rightd to do this.
-
@spanier you cant
-
@spanier This is the way to share your project:

-

How can I check this candles between fast an slow EMA? Fast EMA is rot, slow EMA is black. Open price must be below fast EMA and avove slow EMA. Close price must be above fast EMA. -
@spanier Condition blocks in a row, fast ID1>slow ID1, candle close id1>fast
-
@jstap that does not solve my problem. Here ist the link of my design: https://fxdreema.com/shared/RhLiTW1vc
-
@spanier Ypou have the draw block redrawing and creating a new once per bar, you have time as a price.

-
@l-andorrà Have you found that the candle 0 block makes a difference?
-
@gtoat777 Using candle ID 0 or candle ID can make all the difference. In effect, you can create two very distinct strategies by selecting the exact same blocks and just changing the candle ID. I cannot say which one is better. You'll have to backtest both.