Pls help me, the remote destop window update so i want the ea run as the previous latest value was
-
when the remote destop window update, so ea restart it self every time, so i want the ea run as the previous latest value was, for EXP: my ea is martingale i set +0.01lot every time when it consecutive loses , and my last lot size was 0.05 because my consecutive loses was 4 times, after that in the remote destop window was update, then the ea restart it self to be 0.01 lot again, so it lose because of the ea restart to be the initial lot is 0.01, but it should be 0.05 lot as the previously ea was,
So how can I manually setting the ea to be 0.05 lot again , and it will be restart lot 0.01 lafter it win cover all my consecutive losses. please help me, thank you -
I had same problem with my ea too just make sure you add these blocks in init tab and I hope you have saved lot sizes in a variable

-
Above will likely work but should have a for each trade above. Personally, I would save and read to/from a global terminal variable.
-
if i get it from global variable then it will be not correct.. i need to get variable saved from current orders and then re use it. i cant get it from ea inputs
-
If you have saved to correct value to a global variable then it will be correct. Loops need a for pink each block above.
-
i guess i am not explaining well.. problem is not about getting value from EA input values. What I am doing is creating martingale orders from dynamic distance.. so these buy and sell dynamic distance are increases automatically by the time as market goes down or up very much. this distances are stored in "variables" so when I restart terminal it get reset. I want to keep those "variables"
-
Use global variables, if it is just a constant, condition constant != to global variable - set global variable to constant. Here is some workings with it: https://fxdreema.com/shared/7yZetp7Dd
-
thanks bro will contact you here again if help needed.
-
You are welcome, here is more: https://fxdreema.com/forum/topic/20550/save-variables-constants-if-terminal-closes-crashes
-


Please help me, I create a small project for exp in this link https://fxdreema.com/shared/eUF78wVcc
, I try terminal variable many times but it still restart my lot after I close the ea and run this ea again , I loses 3 times so my last lot size was 0.04, now I close the ea but terminal variable didn't remember my last lot size was, it restart my lot size to be 0.01 , please help me, thank you!
-
With a terminal variable, you need to update the variable manually, as long as you have put the result into the variable it will remain.