1753213841421.png
Hi I am getting this error when trying to compile. What should I do?
i moved all files as well, nothing is missing.
This is for MT4 version
 
View attachment 33700
Hi I am getting this error when trying to compile. What should I do?
i moved all files as well, nothing is missing.
This is for MT4 version
It looks like you are either compiling an .mqh file instead of .mq4. Or you are trying to compile the MT4 version in MT5 (there is no dark mode in MT4 MetaEditor).
 
It looks like you are either compiling an .mqh file instead of .mq4. Or you are trying to compile the MT4 version in MT5 (there is no dark mode in MT4 MetaEditor).
Thank you, I downloaded MT4 from the official site and it installed mt5 instead. i went on to download it from my broker instead and it worked. Thanks again
 
You know, I've just recompiled the EA and it now works fine:

View attachment 33735
Could you please try recompiling it and let me know if it works for you?
This works now. Thank you.
However, I still don't know how to save settings for PS, so when I right-click on a "currency" in Market Watch > then click on Chart Window, so PS opens with settings that I saved before.
I thought that I will achieve this with a saved template (test.txt) and that it will load everytime a new PS in a new chart is launched.
Is there any way to achieve this?
 
This works now. Thank you.
However, I still don't know how to save settings for PS, so when I right-click on a "currency" in Market Watch > then click on Chart Window, so PS opens with settings that I saved before.
I thought that I will achieve this with a saved template (test.txt) and that it will load everytime a new PS in a new chart is launched.
Is there any way to achieve this?
For that, you have to save a chart template with the Position Sizer on it and name it default.tpl.
 
For that, you have to save a chart template with the Position Sizer on it and name it default.tpl.
Finally! I achieved what I wanted. Thank you!
I would just add that in my case it was necessary to set up the PS in input parameters (and not just in the PS tabs) before saving it as a chart template.
 
hello,
first of all thank you a lot for the work you do for us,
im trying to use the expert but it gives me
" Position Sizer .DE40.u,M1: Execution failed. Error: 4112 - unknown error."
it makes the sound like there is insuficinet funds to open a trade
 
Hello there,


First of all, thank you for the great work on the Position Sizer!


I wanted to share a couple of feature suggestions that I believe could enhance its functionality. These ideas are inspired by features I’ve seen in other Expert Advisors (such as Glory, which I’ve attached to this thread for reference).



It would be great to have an option to move the stop loss to break-even based on the R/R ratio.
For example, if I set BE @ R/R = 1 and my stop loss is 100 points, the trade should move to break-even once the price moves 100 points in my favor. This allows for more dynamic and consistent management across trades.



I’d also like to suggest adding a feature for partial take profits based on R/R levels.
For instance, with a 100-point stop loss, I could define the following exits:


  • Exit 20% at R/R = 1 (i.e., 100 points profit)
  • Exit 30% at R/R = 3 (i.e., 300 points profit)
  • Exit 50% at R/R = 5 (i.e., 500 points profit)

This structure allows trade management to be based entirely on risk/reward levels instead of fixed price points, which is much more flexible and professional.




Currently, Position Sizer seems to rely on hardcoded pip values for break-even and partial exits, which limits its adaptability. By shifting to an R/R-based approach, it would become more intuitive and powerful for traders.


Thanks again, and I’m looking forward to seeing even more great features in future updates!
 

Attachments

It would be great to have an option to move the stop loss to break-even based on the R/R ratio.
For example, if I set BE @ R/R = 1 and my stop loss is 100 points, the trade should move to break-even once the price moves 100 points in my favor. This allows for more dynamic and consistent management across trades.
That is unlikely to be added to the Position Sizer.

I’d also like to suggest adding a feature for partial take profits based on R/R levels.
For instance, with a 100-point stop loss, I could define the following exits:


  • Exit 20% at R/R = 1 (i.e., 100 points profit)
  • Exit 30% at R/R = 3 (i.e., 300 points profit)
  • Exit 50% at R/R = 5 (i.e., 500 points profit)

This structure allows trade management to be based entirely on risk/reward levels instead of fixed price points, which is much more flexible and professional.
This is mostly there. When you define multiple TPs, you can set their percentage values and the respective take-profit levels, which, with their R/R ratios visible, are trivial to set to given levels.
 
That is unlikely to be added to the Position Sizer.
Just think about it, when I have a R/R of 2 fixed for all trades, I don't care about the pip numbers anymore. I just set my SL and entry then fire the order. When my BE is also based on R/R of 1 I don't need to set it every time then. At the moment this is not possible to set it at order level and every time after the trade is executed I need to set it which is not that useful for me as a fast scalper.

This is mostly there. When you define multiple TPs, you can set their percentage values and the respective take-profit levels, which, with their R/R ratios visible, are trivial to set to given levels.
You are right. I'm pretty new to Position Sizer. Found it already and it is pretty much what I wanted. Thank you.
 
Hi~I'm using this EA with a broker. I set it up to open two orders simultaneously, which works fine in the demo account. However, in the real account, no matter how I configure it, I can only open one order. Even when I'm placing a pending order, I can only place one. Is this a problem with the EA or a limitation of the broker?
Post automatically merged:

Hi~I'm using this EA with a broker. I set it up to open two orders simultaneously, which works fine in the demo account. However, in the real account, no matter how I configure it, I can only open one order. Even when I'm placing a pending order, I can only place one. Is this a problem with the EA or a limitation of the broker?
 
Hi~I'm using this EA with a broker. I set it up to open two orders simultaneously, which works fine in the demo account. However, in the real account, no matter how I configure it, I can only open one order. Even when I'm placing a pending order, I can only place one. Is this a problem with the EA or a limitation of the broker?
Are you setting up the second TP? What is the output in the Experts tab log when you execute the trade?
 
Hi earnforex, is it possible to simplify the SL and TP display options to just %, and also provide a shortcut option to hide and show the panel? I don't mean minimize the panel, but remove it. I think it would be cleaner if applied to multiple charts. All I need to do is move the SL and TP lines to the target %, thank you.

01.png
 
1754485629810.png

i want to risk $100 for 100 pips SL at XAUUSD, it suppose to be 0.10 lot size but why Position Sizer make it 1.00 lot which means the risk would become $1K ?

i use MaxrichGroup-Real server
 
View attachment 33882

i want to risk $100 for 100 pips SL at XAUUSD, it suppose to be 0.10 lot size but why Position Sizer make it 1.00 lot which means the risk would become $1K ?

i use MaxrichGroup-Real server
Not sure why you are calling that 100 pips. That's 1000 points. The contract specification says that it's using the Forex profit calculation mode, which means that the tick value is used directly without any adjustment. The tick value is given as 0.1, which means that 1000 points of loss on 1 lot should result in a $100 loss. I could only verify that if I saw a screenshot of any active or past trade.
 
Not sure why you are calling that 100 pips. That's 1000 points. The contract specification says that it's using the Forex profit calculation mode, which means that the tick value is used directly without any adjustment. The tick value is given as 0.1, which means that 1000 points of loss on 1 lot should result in a $100 loss. I could only verify that if I saw a screenshot of any active or past trade.
1754528060666.png

Hi there,

Thanks for your kind reply. I have prepared a combined screenshot with my recent trade that I hope will clarify the issue.

As you can see in the screenshot:
  1. In the Position Sizer panel:
    • I set the Risk, USD to $100.
    • I set the SL distance to 1000 points.
    • I set the TP distance to 2000 points.
    • The EA's output calculated a Position size of 1.00 lot.
  2. In my actual trade:
    • I used a Position size of 0.10 lot.
    • When this trade hit the same TP distance (2000 points), it resulted in a $200 profit, which is exactly what the Position Sizer was trying to achieve for a $100 risk.
It seems to think a 1.00 lot on XAUUSD is needed for a $100 risk, when in reality, a 0.10 lot is the correct one.