How can I mute for first program, run the second one
-
Let's say, I have one EA has two program, two open trade with different condition, how can I set: when the second program run, then first program stop running until the second program finish.
-
@tradingstrategy88 You might use one of the following options:
- Use switch off Switch on blocks when entering trade and reset on exit
- Use flags .. for example boolean and do the same as in 1.
- Define a variable (eg. bool data type) and set it's value to the correspondent event before entering trade and on exit. Check value on each entry path
- Use groups for each trading strategy and for check use No trade block with correspondent group number
There may be more options but in principle you set a condition on entry of a trade, which will be checked by each of the implemented strategy entry paths. As long as that condition is valid you will not let each strategy to go it's entry path. You need to care for re-set the condition on trade exit.
-
@trader-philipps Thanks for that, But do you have any example ? I keep confusing with it
-
I strongly recommend you to read trader's splendid tutorial thread including most of those features:
https://fxdreema.com/forum/topic/8618/tutorial-expert-advisor-with-some-recent-issues-solved/14