@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: 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