SETTING CLOSE ALL TRADES AT EQUITY/BALANCE PROFIT
-
Hi,
I am trying to set a close all trades and terminate EA at % Equity Gain from Balance.
Although I have seen examples of this in the forum, the problem that I have is that the settings in the conditions block cannot be set as a user variable. It is ok for me if I am the only one that is using the EA but if I am presenting an EA to multiple users, they cannot set the Equity Gain % from Balance as a variable. It can only be adjusted as a fixed value from the programmer's perspective.
Is there a way that I can set this part of the conditions block to be a variable instead of a fixed value?
Many Thanks & Best Regards,
Daniel
-
Here is about Constants and Variables - https://fxdreema.com/examples/#Constants-and-Variables
Constants are actually variables, but they are also the input parameters of the EA, so don't modify them in the EA.
Variables - global variables in the whole EA. Don't use too much of these.Constants and Variables - you will see that there are multiple ways to use them, it's your choise. One of the ways is to just write the name of the Constant/Variable in any of the input fields of the blocks.
-
Thanks! I will have a look at this.
Best Regards,
Daniel
-
I have tried this and I must say I am happy that I have this constant / variable option in your software. It adds a bit of flexibility in some places. However, the issue that I am having is that what I want to change as an input for the EA user has an asterix "*" in it as it requires a multiplication.
I attach a screenshot of what I got so far. I have tried it as an int double and I have tried it as an int string but it is not doing the job.
Any ideas?
Thanks,
Daniel
......
Screenshot_1.png -
Ok, just put that * before the name of the constant