@roar I have changed it to zero in both windows, but it still opens one trade and then nothing.
Do i need to change the "int" ID_var to a "double" ID_var?
@roar I have changed it to zero in both windows, but it still opens one trade and then nothing.
Do i need to change the "int" ID_var to a "double" ID_var?
@roar hmm. Maybe I did something wrong but it doesnt work for me,.
It only opened one trade in 6 years.

I show you an example, those Candles I circled, have crosses the Moving Average.
So it gave me two buy signals. But the crossing of the indicator below has happened way sooner.
The first Candle cross was 3 Candles too late and the second one was 7 Candles too late.
Means that my Algo shouldnt take those trades.
For the EA part, I did it like this :

Did I make a mistake?
@roar sorry to bother you again.
How can I build this.
Condition 1 : If Price has crossed Moving Average to the upside, then enter Long.
Conditon 2 : But only if the 2 Lines Indicator also has crossed above, doesnt matter if it happened at the same time. But the Crossing shouldnt be older than 7 Candles.
@roar but that would still trigger both, or am I wrong?
Edit: Aaah no sry, I misunderstood.
Condition 8 would go through first and after that the tree is done, because it only runs through once a day.
Good Idea thank you mate.
My problem is that the EA always opens the trades two times if both "Condition Trees" are true.
I don't know how to code that in the Condition block for "If" rules. Or is there maybe a block where I dont have to code anything?
Condition Tree 1 : If Price crosses Moving Average to the upside enter a Long Trade.
Condition Tree 2 : If the Two Lines Indicator crossed and gave me a Long Signal enter a Long Trade.
Now the Problem is that I trade the Daily chart and it often happened that Condition Tree 1 and 2 were both true at the same time.
Logically it opens two trades. But I want that it opens only one Trade.
Like : "If Condition Tree 1 and 2 is true, then only open a trade on the Condition Tree which was first".
Is that possible?
Thanks in advance
Ok I found the problem.
I saved the variables as "int" instead of "double". my bad.
Everything is working fine now.
Anyways thanks for your help 


I tried it like that but it is kinda strange.
It only opens Sell Positions and even then it opens a trade everytime the Moving Average gets crossed.
The rule should be like:
Candle closed above "Moving Average" -> is the "candle close" lower then or equals to "Moving Average + ATR value"
If yes open long position.
Is there a way in FxDreema to add the value of the ATR to a Moving Average that is on the chart?
It should be like this :
If price crossed the Moving average to the upside and if it is within the Range of (Moving Average + Value of Atr) then I can enter a buy.
If not then it wont trade.
Thanks for all the answers.