Block execution order
-
Hey guys. My EA is executing the red blocks before it's executing the blue blocks. That is to say it's closing trades based on variables before updating the variables, and then updating the variables a tick later. Any suggestions?

-
Have you tried normalizing the IDs (Options -> Project Options -> Project Blocks: Normalize IDs)
-
@sktsec thanks so much for the reply! I normalised the IDs but it's still happening
here is is closing the trades based on the variables
and here is the next tick where it's now updated the variables -
Could you please share the link to the project instead?
-
https://fxdreema.com/shared/uyL0HmRHc sorry for the late reply, thanks so much for your help!
-
Definitely the problem seems to be the order of execution of block trees. I see some loops are executed sometimes before the launchers they are supposed to follow. I recommend a general review of all of them according to your strategy logic.
-
how do you affect the order? is it the position on the page? or the block numbers?
-
Mostly the order of the blocks, on the odd occasion the block numbers will affect when things are activated. Personally I tend to make block numbers line up with the order.
-
@Castlemaine Exactly as jstap said.
-
how do you manually change the numbers on the blocks? that would make things much easier. Also does it usually execute the blocks/trees higher to the "top" of the page first?
-
Ok I literally only just realised you can click on the nubmers and change them! that's a game changer! does position on the page matter too?
-
@Castlemaine Position does not matter
-
incredible! thanks so much!