Two line cross over
-
I would like to request this communities help with following 2 problems:
- I want to create a basic EA with following condition:
If (Indicator signal line (Red) x> Indicator base line(Blue)) then buy at the open of next candle (not at the candle that crosses).
That way i want to ensure the crossover is real and not fake.
- I want to put stoploss and take profit based on ATR. For example TP 2 ATR and Stoploss 1ATR. I want this to be dynamic and not a fixed amount
Your help is much appreciated
that
 -
For stoploss, this is by the way how i have setup the EA so far, but it does not work

-
I just fixed the stop loss the way i wanted, but noticed one more issue.
The EA should take a trade when 2 indicator lines cross each other, you can see this in first 2 examples happining, but the 3th and 4th time EA does not take a trade.
Anyone any suggestion?


-
For finished crossover, use Candle ID = 1.
For ATR stops, use Custom (price fraction) instead of Custom (pips). I call these values such as 0.0010 price fractions, because if you imagine all prices in a vertical line, small part such a 0.0010 is like a fraction of the whole... if that makes sense

The condition block should not care about past signals at all, this block check the values at the current moment only. I don't see reason for it to work 2 times and then to fail. Check if you have any error messages. Also put Trace block to see the actual indicator values, in case something is wrong with the indicator. It also depends on other blocks, if you have