@Enivid I just noticed. the "magin util, % , (it's) Per symbol and Max Margin %" is works only for the market entries.. not for the pending entries
View attachment 40538
Currently that works as intended because pending orders don't require any margin. I will consider revamping both risk and margin calculations for the future version with switches to turn on/off margin for pending orders.
 
  • 🎉
Reactions: EnrichWave
Position Sizer has been updated to version 3.17 to implement some major changes along with fixing some bugs:
  • Added the Costs side panel that displays costs associated with the planned position. (Via GitHub)
  • Added an option to use a negative Breakeven value for a TP-based breakeven. (@E.M)
  • Added a precautionary activation of mouse move events in OnInit() to fix a problem when some other indicator could turn them off. (Via GitHub)
  • Changed how portfolio risk is calculated. Now it uses a complete algorithm to take into account hedging and potential order closure due to SL and TP.
  • Changed how portfolio margin is calculated. Now it calculates the maximum used margin based on the current positions and orders. (@EnrichWave)
  • Changed how max portfolio risk restrictions on the Trading tab work. They will now take into account the trade filters on the Risk tab.
  • Optimized performance somewhat by re-using calculated commission in MT5. (@iardavan)
  • Fixed a bug that prevented the default Position Size input parameter from working in MT5. (@Nathan.Küster)
  • Fixed a bug that crashed the Position Sizer in Strategy Tester when removing TPs. (@Nathan.Küster)
  • Fixed a bug with the position size value auto-shriking in Strategy Tester when volume share of all TPs didn't add up to 100 exactly (e.g., with 3 TPs). (@Nathan.Küster)
  • Fixed price-based commission calculation for pending orders to use the Entry price rather than current price in MT5. (Via GitHub)
  • Fixed a potential error in commission calculation for non-Forex instruments that could lead to incorrect values in very rare situations in MT5.
  • Fixed two very small bugs with BE lines in MT5.
  • Fixed currency conversion issues in Strategy Tester in MT5.
  • Updated translations. (@Mio)
Please feel free to download and test. I am especially interested in feedback on the portfolio risk calculation. Does it cause any performance issues? Does it get interrupted due to the number of orders?
 
  • 🎉
Reactions: Mio and EnrichWave
MT5 3.17 Translated to Portuguese-Brazilian (PT-BR)
MT4 3.17 Translated to Portuguese-Brazilian (PT-BR)

What I did for this version


- Portuguese.mqh (MT5 and MT4): translated every new string in 3.17:
- Costs side panel: the button, all labels, and all tooltips (`TRANSLATION_BUTTON_COSTS`, `TRANSLATION_LABEL_TOTAL_COSTS`, `TRANSLATION_LABEL_COSTS_*`, `TRANSLATION_TOOLTIP_COSTS*`)
- Margin tab: `TRANSLATION_LABEL_PLANNED_POSITION`, `TRANSLATION_TOOLTIP_PLANNED_POSITION`, `TRANSLATION_TOOLTIP_MU_PERC`
- Trading tab: `TRANSLATION_TOOLTIP_BREAKEVEN` (positive and negative breakeven)
- Log message: `TRANSLATION_MESSAGE_TP_WAS_MOVED_FROM`
- MT5 inputs: `INPUT_DESCRIPTION_DefaultShowCostsPanel` and `INPUT_DESCRIPTION_SwitchCostsPanelHotKey`
- Portuguese.mqh: removed the four `TRANSLATION_LABEL_MU_PERC*` labels that are no longer in English.mqh, so Portuguese.mqh now has the same keys as English.mqh on both platforms.
- Costs panel labels kept short. The PT-BR "% of" labels are shorter than the English ones. `TRANSLATION_LABEL_COSTS_PER_PS` is a single word ("Ordem"), so the column header still fits when the position size is added after it.
- One more MT5 input name fixed for the 63-character limit. The hotkey note (`INPUT_DESCRIPTION_____`) was 76 characters in PT-BR and was cut in the Inputs dialog. It is now 58. All PT-BR input names in MT5 are now within the limit.
- The Common-tab credit stays as in previous versions, only in the PT-BR .mq5 and .mq4 that I share with my community. It is not a change to Portuguese.mqh and does not need to go into the official files.

@Enivid

Thank you for 3.17.
 

Attached File(s)

  • 👍
Reactions: Enivid
Position Sizer 3.17 freezes when switching timeframes in MT5 — memory leaks

Hello,

I am experiencing recurring issues with Position Sizer.

My current configuration is:

  • Windows 11.
  • MetaTrader 5, build 6230.
  • Broker: IC Trading.
  • USD demo account.
  • Position Sizer 3.17, compiled in Spanish with zero errors and zero warnings.
  • Six Forex charts running simultaneously.
The problem also occurred with version 3.11.

When switching between timeframes, the Position Sizer panel sometimes becomes completely unresponsive while the chart continues updating. On other occasions, the chart freezes while Position Sizer remains responsive.

I have tested the EA on a clean chart and progressively added my usual indicators. The problem is intermittent.

The following warnings appeared in the Experts log:

  • 332 leaked strings left.
  • 1005 undeleted dynamic objects found.
  • 1 object of class 'CPositionSizeCalculator'.
  • 146560 bytes of leaked memory found.
Similar warnings have appeared on EURUSD, EURAUD and CHFJPY.

Could this be related to the deinitialization process when switching timeframes?

Is there a known solution, or would you recommend any additional diagnostic tests?

Thank you for your assistance.
 

Attached File(s)

  • Captura de pantalla 2026-11-30 120941.png
    Captura de pantalla 2026-11-30 120941.png
    154.4 KB · Views: 2
  • Captura de pantalla 2026-11-30 120914.png
    Captura de pantalla 2026-11-30 120914.png
    145.9 KB · Views: 2
Position Sizer 3.17 freezes when switching timeframes in MT5 — memory leaks

Hello,

I am experiencing recurring issues with Position Sizer.

My current configuration is:

  • Windows 11.
  • MetaTrader 5, build 6230.
  • Broker: IC Trading.
  • USD demo account.
  • Position Sizer 3.17, compiled in Spanish with zero errors and zero warnings.
  • Six Forex charts running simultaneously.
The problem also occurred with version 3.11.

When switching between timeframes, the Position Sizer panel sometimes becomes completely unresponsive while the chart continues updating. On other occasions, the chart freezes while Position Sizer remains responsive.

I have tested the EA on a clean chart and progressively added my usual indicators. The problem is intermittent.

The following warnings appeared in the Experts log:

  • 332 leaked strings left.
  • 1005 undeleted dynamic objects found.
  • 1 object of class 'CPositionSizeCalculator'.
  • 146560 bytes of leaked memory found.
Similar warnings have appeared on EURUSD, EURAUD and CHFJPY.

Could this be related to the deinitialization process when switching timeframes?

Is there a known solution, or would you recommend any additional diagnostic tests?

Thank you for your assistance.
This is probably related to a combination of the Position Sizer with some custom indicators on the same chart. Could you please try testing this on a chart with no custom indicators attached to it?
 
if possible can others have that?.


Sure! The source code is attached (version 1.12).

- It is built on top of the official Position Sizer 3.17. The calculations are the original ones; I added a new panel and some features.
- The "Pro" in the name is only there to tell it apart from the original, not to suggest a better version.
- The version number is my own: I started this project at 1.00.
- The new panel is only in Portuguese for now.
- It is still in development. I plan to remove the original panel completely; for now it is still in the code, just hidden.
- It blocks new orders shortly before long market closures (FTMO's gap rule), and this is on by default. The README explains how to turn it off.
- So far it has been tested on a demo account only, and I don't have time to provide support, so please use it at your own risk.

The README.txt inside the zip explains how to install it.
 

Attached File(s)

  • 👍
  • 🎉
Reactions: Enivid and EnrichWave
Hello!


I have downloaded Position Sizer MT5 and installed it following the video I am using as a guide. I enabled "Algo trading" for the EA in MetaTrader 5—which went smoothly—and activated the EA (pressed "Play").

When I try to execute a buy order using "Shift+T," I hear a sound, but no trade is actually placed. I also tried placing a trade manually via the "Trade" tab, but that also just results in a sound.

I have gone through the process many times; I even uninstalled the FundedNext CFD MetaTrader 5 platform, downloaded it again, and reinstalled everything exactly as shown in your YouTube video.

None of it works. I am able to place trades manually through MetaTrader 5, but not using your Position Sizer.

Please help me.
1796298676285.png


1796298638562.png


1796298591821.png
 
Hello!


I have downloaded Position Sizer MT5 and installed it following the video I am using as a guide. I enabled "Algo trading" for the EA in MetaTrader 5—which went smoothly—and activated the EA (pressed "Play").

When I try to execute a buy order using "Shift+T," I hear a sound, but no trade is actually placed. I also tried placing a trade manually via the "Trade" tab, but that also just results in a sound.

I have gone through the process many times; I even uninstalled the FundedNext CFD MetaTrader 5 platform, downloaded it again, and reinstalled everything exactly as shown in your YouTube video.

None of it works. I am able to place trades manually through MetaTrader 5, but not using your Position Sizer.

Please help me.
1796298676285.png


1796298638562.png


1796298591821.png
What does it say in the Experts tab log when that happens?
1796308848344.png
 
I have been in contact chatt with FundedNext CFD; they do not allow the use of EAs on demo accounts, during challenge phases, or on funded accounts of $100,000 and above. However, they do permit the use of EAs on accounts of $50,000 and below.

I am currently using a demo account, so let’s leave it at that. Thank you for taking the time to speak with me, though.

Have a great day.

What does it say in the Experts tab log when that happens?
View attachment 41491
 
@Enivid in the case EA not allowed to place traders/orders.. Kindly have feature to show the order window that aligned with the PS parameters.. for example.. if the order size is 0.2 lot with SL,TP set in the PS EA, while pressing the key combination, or click on Trade button, open the order window that has lot size 0.2 with SL, TP of the EA's (if suppose comment mentioned that is too)...

instant​

2026-12-04_0959311.png2026-12-04_100055.png

Pending​

2026-12-04_1003201.png2026-12-04_100514.png
 
@Enivid in the case EA not allowed to place traders/orders.. Kindly have feature to show the order window that aligned with the PS parameters.. for example.. if the order size is 0.2 lot with SL,TP set in the PS EA, while pressing the key combination, or click on Trade button, open the order window that has lot size 0.2 with SL, TP of the EA's (if suppose comment mentioned that is too)...

instant​

View attachment 41502View attachment 41503

Pending​

View attachment 41504View attachment 41505
You mean if the automated trading is disabled, the Trade button opens the manual trading dialog? I don't think that's possible with MQL5 programs (except with some not very reliable DLL hacks).
 
  • 👍
Reactions: EnrichWave