@roar, Sell now and Buy now with% of Balance or% of Equity but with minimum lot. (Solved)
-
@roar, Good morning! I need help, I want to configure the Money Management of my Sell now and Buy now with the% of Balance or% of Equity, but if its lot size is less than 0.02, apply this 0.02 and not the result of the above. can i do?
Thanks a lot. -
@xyon126 An interesting question. The only way I can imagine now is ugly but effective. Simply open the trade with the corresponding percentage. Then store the lost size into a variable. Then compare that lot size with that limit. If it is less than that, remove the open trade and create a new one with that lot size. You can get it altogether in the same block tree. Your MT4 log will show more trades, but you will get what you want.
-
@l-andorrà La idea no esta mal, pero el problema es que si lo realizo llego a poderlo conseguir, pero abro operaciones a lo tonto que solo beneficia al Brocker con el agravante que si el PAR tiene un Spread muy grande pues eso que con 5 operaciones le regalo a lo tonto 5€ o mas, dependiendo del tamaño de la operacion y que tenga suerte y sea con beneficio, sino le tengo que sumar las perdidas si sale negativa. Pero gracias de todas maneras.
-
@xyon126 Try this code: https://fxdreema.com/shared/OaBJphFqd
However, in order to use it you have to create a variable that you will call: LOT which you will initialize with 0 (zero), and which you will put in place of the buy and sell lots in the market. And also you will have to create 2 constants, 1 you will call it: PERCENTAGE, and you will put the percentage% of Equity you want to put into play,(to calculate 1% you will have to write 0.01 while to calculate 10% you will have to write 0.1). And the other you will call it: MINIMUM_LOT, and inside you will put the value 0.02 that is the minimum of the lot beyond which you must not go down. I hope I was clear.
-
@pontedruse Thanks a lot. One question: you comment that to put 1% in the constant PERCENTAGE I have to put 0.01, if in the "custon MQL code" block that has this code "LOT = (AccountEquity () * PERCENTAGE / 100000);" I change it to this "LOT = (AccountEquity () * PERCENTAGE / 1000);" Can I put the normal percentage, that is, instead of for 1% put 0.01, for 1% put 1, or is it a lotage problem and it does not allow it?Another query, in the "on init" tab, are there two disconnected blocks, do you have to connect them, they are already fine like that or they do nothing and can they be eliminated?
-
@xyon126 If you want to get the percentage as you say you have to change it in this way: (AccountEquity () * PERCENTAGE / 10000000);
As for the 2 blocks located on init, you can very well delete them because they are not needed, I just forgot to delete them.
-
@pontedruse OKAY! Thanks a lot.
-
@pontedruse Hi @pontedruse ! I have a question that I think you can solve for me, since many colleagues have answered me but all different and they have not clarified it and I think that you can; It refers to the percentage in money management, when we choose the "% of Balance" in money management and you want 0.5% of your capital, what number should be placed 100.5 or 0.5 and the same for the "% of Equity". Thanks a lot
-
@xyon126 Hi if you only want 0.5 % of capital, you have to multiply the capital by 0.005.
If, on the other hand, you want the capital + 0.5 % you have to multiply the Capital by 1.005
But you have to keep in mind that if you use that modified formula I gave you last time: (AccountEquity () * PERCENTAGE / 10000000); for equity, and which can also be used very well for balance making it become like this: (AccountBalance () * PERCENTAGE / 10000000);
0.005 becomes 0.5 and 1.005 becomes 100.5
I hope I was clear

-
@pontedruse Hello PPP! Thank you very much PPP. The formula that you gave me was very good, now it is only the real value, that is, what has to be put in the box to get 0.5%, 1%, etc. without having to put the two blocks that you put me,Since the account is higher than € 3000, the minimum value exceeds 0.02 Lots, and now it should come out 0.03 or similar.

Sorry, another query on the same topic, The formula (the two blocks) that you gave me is indifferent for the PAR (EURUSD, GBPJPY) or it also varies according to the PAR
-
@xyon126 Hello. in this case you have to put 100%
because the fxdreema algorithm transforms dollars into lots by multiplying: 3000 x 0.00001 = 0.03
or by dividing 3000/100000 = 0.03If you would have put 200% the result would have been:
6000 x 0.00001 = 0.06 or: 6000/100000 = 0.06
etc.etc.In practice, the budget is halved, doubled or tripled, multiplying everything by 0.00001 or dividing by 100000.
Regarding the par (EURUSD, GBPJPY) etc. it is not specific to a single pair, but is good for all par pairs.
-
@pontedruse OKAY! Thank you very much @pontedruse. One more question, would you be so kind to look at this post and help me, since no answer given has helped me and possibly you know how to do it.
-
@xyon126 I can't tell you, unfortunately I've never worked with draw lines.