Problem
Position Sizer allows configuring which corner of the chart the panel should be placed through the PanelPositionCorner input, with options for all four corners: upper left, upper right, lower left, and lower right.
When setting the panel anchor to the right side of the chart, in a dual monitor setup, a positioning problem was identified. MetaTrader at normal size (when opening the program) opens on monitor 1 (left). When resizing the MetaTrader window to the right side (occupying monitor 2), the panel position did not follow correctly, ending up in different positions with each window size change.
The original EA behavior of saving each interface position change to the INI file also made it difficult to keep the panel in the same place when resizing the window. With each resize, a new (incorrect) position was saved, and that position was used as reference for the next calculation, creating inconsistency. Additionally, the constant I/O to the INI file brought some delay during transitions.
With the anchor on the left side, the problem did not occur, since the left corner of the chart remains fixed when the window is expanded to the right.
Solution
I added the LockPanelToCorner input that allows the user to choose between two behaviors:
false (default): Original behavior maintained — position is saved to INI file and panel can be dragged freely
true: Panel always calculates its position from the configured inputs (PanelPositionX, PanelPositionY, PanelPositionCorner), correctly following window resizing without saving to INI
This way I preserved the original code and logic for those who prefer the EA working the previous way, while I offered the new option for those who face the positioning problem.