Delete all pending orders and closed all trades after one click in button
-

Why it doesnt work?
-
I'm new here so in no way qualified to answer your question but to me... I see that you have these blocks in the "on trade" tab which means that it only works on time per trade. You have to set the condition on trade open or on trade close or what ever. Which is not done in your picture. If you put these blocks in the "on chart" tab it should work better. But I have also seen some posts where people put there blocks in the "on tick" tab which means it happens ever tick. Remember those tabs mean that when that even happens, then the blocks will be executed. SO "on init' means only once when the EA starts. ' on tick" means every tick. "on trade" means once per trade and so on...
-
Statonhotz is right. Move all those blocks to the 'on Chart' tab.
-
tks for your suggestion. how bout the "pass> draw button" ? should i put it in the "on chart" or "in it"?
-
@osasono It depends. When is the button supposed to be drawn? And is it removed at any later moment?
-
@l-andorrà yah actually my ea will make me enter into several trading. The purpose of that button actually to close all trades at once. so the button should be on chart all the time.
-
@osasono Another option can be 'redrawing' it every single time a tick is arriving to your MT4 if you draw it ib the 'on tick' tab.