Unsolved Pause button for EA
-
Hello guys i need help. How can I create a pause button for my EA. I want to run it on many currency pairs(charts). I want to be able to pause the EA on one chart without interrupting the others. the auto trade button on mt5 disables all EAs at once.
-
You can create a button so that when you click on it, the bot is not opening more trades on that chart until you clock on it again. Are you familiar with buttons?
-
Set a bool variable to disable/enable the buy/sell blocks. Then create a button to toggle the bool variable.
As @l'andorrà suggested, creating a button is not straightforward. Maybe you can try a demo and share for discussion
-
@JairusDedino Mt5 is not as easy to backtest, and to stop each bot it will need to check something like a global variable. This will give you an example of how you can achieve this: https://fxdreema.com/shared/pTdDdY2Fb
-
@l-andorrà no no i am not. I tried creating one using this tutorial:https://www.youtube.com/watch?v=pijVy93UoDw&t=356s but it does not work.
-
@jstap you are absolutely right about mt5. the button I created using a tutorial does not work on back test but works when the robot is deployed. I will equally try on mt4 to confirm.
-
@JairusDedino Can you please share the link to your project?
-
@l-andorrà This is what i tried to do. still not sure if it works given the complex back testing system of mt5.
https://fxdreema.com/shared/PzGwfCuOb . its is a simple buy now EA with the on/off button. -
You are not changing the value of the variable that is controlling the launcher. That is what what you need to do now. You can do that by using a 'modify variables' block.
-
Ohh that makes a lot of sense now. should this be done on the on tick tab or on chart tab?
-
Do you mean the button structure? It needs to be build on the 'on chart' tab as it is now. Don't change that. The launcher should be on the 'on tick' tab, though.