@luqmaan as I said, the EA runs the whole algorithm on every tick. Your algorithm has "close trades" immediately after "buy now". This means your trades are opened and closed at the same tick.
To fix this, use the ELSE-output of "No trade":

@luqmaan as I said, the EA runs the whole algorithm on every tick. Your algorithm has "close trades" immediately after "buy now". This means your trades are opened and closed at the same tick.
To fix this, use the ELSE-output of "No trade":

@luqmaan I fear there is also some timing problems. You see, the EA runs the algorithm on every new tick, and forgets everything that happened last tick.
Do you need to apply AND-logic to zero cross and signal cross? So that they must happen at the same instant (tick)?
Also, do you want to act immediately when a cross is detected (intra-candle), or wait until the candle has finished and the cross gets confirmed in the chart history? To do this, you must use candle ID 1 in the block parameters.
@luqmaan MACD works just fine for me. You have probably misunderstood some of the labels in MACD, as they arent very clearly explained (main line, signal line, "moving average of oscillator")
Strategy optimizer always tries to "trick" you by finding profitable trades from totally random set of possibilities, i.e. profit in history but random result in future.
With this mindset, the goal in optimization is to find results that are least likely random coincidences, i.e. results with high statistical significance. This significance increases when you have
@tradeandearn-0 thats because martingale is simply betting that x number loss streak never happens. In long run, any length loss streak is guaranteed to happen.
@mlnaumann the EA works tick-by-tick, and it doesnt "remember" anything that happened in earlier tick cycles.
You'll have to make a more detailed example of this cross problem
@tradewith_rubin I dont see any error in the other blocks
@biztet its a bit complicated, but one solution is to use the studio and create a custom block out of that indicator.
However, simply copy-pasting the code won't work, you have to change the buffers into fxdreema variables.
@tradewith_rubin the variable is in the wrong field here:

@len-1 ah, I see.
The purple block loops through all individual trades, so you are able modify each trade separately. Blue "modify stops" does the changes for all trades at once
@len-1 what do you mean? There is only one way to implement, as far as I know
@ramimoujaes that million-word sentence is a bit difficult to follow, but I think this is close to what you need:
https://fxdreema.com/shared/WsOlW0N7e
@tradewith_rubin turning blocks on and off is a bit difficult to control. I think your delay happens because of these toggles + additional ticks in your "Every n ticks" block.
Try this approach:
https://fxdreema.com/shared/sOJ5SY9G
@papaskindog maybe its a timezone thing, but my ATR shows 0.00063 there:

Also bear in mind that you have selected candle ID 1. This means trades entered in 0800 hour will check the ATR from 0700 hour.
@len-1 if you put "once per bar" block on top of your logic tree, the blocks below that block will run at the first tick of each new candle on your chart, but they will not run on 2nd, 3rd, 4th... ticks, until a new candle appears.
Your EA runs the code on every new tick (OnTick), over and over again thousands of times every day. Filters just cut the process if the time isn't right.
To check if your EA takes the right H1 ATR value, you can use "comment" block or "log message" to write the ATR values and see for yourself.
@papaskindog it seems to work just fine
