how to pause(sleep) a script?
-
hey guys,
has anyone already paused a script with dreema, so the script just needs to be added once to the chart, and works lets say once a bar and then sleeps till a new bar comes and runs again ?
any help on this is appreciated, thanks! -
You don't need a script to do that. You can create a structure in your Ea doing exactly that. Why using a script and an EA when the EA can do it all?
-
@l-andorrà
because an ea runs already on the chart and i cant run 2 on the same chart and i need data from the chart, which the script should collect.So i need to add a script and pause/sleep or i need to make a custom indicator, since i didnt work much with indicators yet i prefer the script

-
Create buttons instead. You can pause an EA at will just by clicking them whenever needed.
-
@l-andorrà
to clarify, the ea which runs on the chart isnt mine, so i dont have the code or can change any bit of it.the task is:
an ea already runs on a chart and cant be changed
add a script that is just added once and will run oo, which means it pauses right before its terminated and restarts on a certain contain.... -
Turn auto trading off via blocks, then back on. This will disable all EAs but is the only way I know to stop EA without the code
-
but this only turns off the ea not the script, since with the end of the script it is terminated
-
I don't use scripts, I don't see the point in them unless you want to get some information. Generally switching blooks/trees on/off will achieve everything that's needed. Scripts work when selected, so just don't select. If EA needs a script, recreate it.
-
Hi @bk7. Are you trying to prevent the ea from opening trades like during news hour? I think maybe you can't control the ea because it's not yours. But maybe you could make the ea instantly close the trade every time it opens during that period. You might lose some, but not much i think.
-