Please help (Solved)
-
Please help with this EA, The EA works fine but the problem is that it opens 20-30 trades in a row, I need only one to open. Could you help me?
This is the link:
https://fxdreema.com/shared/PG6Y3tqje -
@xyon126 On Two "modify variables" blocks,leaves value numeric on second variable,because compiler return an error.Where do you create SL object in the project?

-
You can't change projects on the fly and ask for 2 things in the same post.
-
@miki "SL" is a horizontal line named "SL" that I create manually with MT4, this line is where I want the Stop Loss to be. Regarding the variable "Distance" I modify it because the resulting value has many decimals and to obtain the necessary pips with an absolute value I think it is better, also depending on whether it is BUY or SELL it gives me a negative value and I think that fxDreema does not tolerate negative values and MT4 neither.
-
@xyon126 Yo can easily limit the maximun number of open trades by selecting a 'Ckeck trades count' block on top of each tree.
-
@l-andorrà Thank you very much, I had already tried it and it was blocked, I have tried it with the trees in the "on Tick" and in the "on Timer", in the "on Tick" it does nothing, it crashes and in the " on Timer "opens infinite operations for me. There must be another way but I don't know which one.
-
@xyon126 What do you exactly mean by 'it does nothing'? Does it open at least one trade?
-
@l-andorrà Exactly what I say, it stays blocked and does nothing, you see the button pressed and nothing else, at least I press it again and the button deactivates and I have not obtained anything. At least it is the result that has given me in the MT4 demo account since in the Backtest it can not be tested and in the demo I do not lose anything.
-
@xyon126 Can you please share the latest version of your project, please?