Loading…

Stop Out Price Projection

Margin level is usually watched as a percentage in the terminal's status bar, which tells a trader how close they are to a forced close but not where price actually has to go to get there. This indicator converts that percentage into a price: given the account's current equity, used margin, and the broker's stop out level, it solves for the price on this symbol that would push equity down to the stop out threshold, then draws it as a dashed warning line. The projection holds every other open symbol's floating profit and the account's total margin requirement constant while solving for this symbol's price. On an account with positions open on several symbols at once, that is an approximation, not an exact multi-symbol prediction - the label on the line says so directly, because presenting an approximation as an exact number is worse than showing nothing. On an account with a position open on this symbol alone, the projection is exact up to the platform's own rounding. Notes and limitations - Assumes every other open symbol's floating P/L and the account's total margin requirement stay fixed while this symbol's price moves. On a single-symbol account this holds exactly; on a multi-symbol account it is an early-warning approximation, not the precise multi-symbol stop out price - the on-chart label states this plainly. - Uses net position volume on this symbol (buys minus sells). On a hedged account with equal and opposite lots on the same symbol, net volume is zero and the line is removed, since an equal hedge cannot itself be stopped out by this symbol's price alone. - Reads AccountStopoutMode() and AccountStopoutLevel() from the terminal, so it reflects the account's actual broker-configured threshold rather than a guessed default. - This is a live risk display, not a historical signal series - it holds no buffered output and produces no alerts.

Indicator · MT4 · v1.0 · Free

About Stop Out Price Projection

Stop Out Price Projection is an indicator for MetaTrader 4. It has 3 settings, such as Line color, Line style and Line width. MQL source code included.

Files in the download: StopOutPriceProjection.ex4, StopOutPriceProjection.mq4, StopOutPriceProjection.txt.

Settings

SettingDefaultWhat it does
Line colorclrCrimsonWarning line colour
Line styleSTYLE_DASHWarning line style
Line width2Warning line width

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria