Loading…

Scale In Plan Calculator

A pyramid that sizes every add-on the same way the first entry was sized gets more dangerous with every rung that fills, because total risk grows with each add rather than staying capped. The naive version of this plan - "just add another lot at the same size each time" - turns a single bad move after the last add into a much larger loss than the trader signed up for at the first entry. This calculator instead splits one fixed risk budget evenly across the number of rungs planned, before any of them fill. Each rung's fair share of the budget is then converted into a lot size using that rung's OWN stop distance - the distance from that rung's entry price back to the single shared stop, which naturally grows as price runs further from the stop with each successive rung. A rung further from the stop needs fewer lots to spend the same slice of the budget, so if every planned rung fills and the shared stop is then hit, the total loss is the original budget, not a multiple of it. Lot sizes are rounded down to the broker's lot step, never up, so a real plan never risks more than the stated budget even after rounding - only possibly a little less. A rung whose fair share is too small to buy even the broker's minimum lot is reported plainly rather than silently rounded up into a bigger risk than planned. The table also carries a running total as each rung is added - cumulative lots, cumulative risk, and the resulting weighted-average entry price - so the plan can be read as "if only the first two rungs fill" just as easily as "if all four fill." Notes and limitations - Assumes one shared stop for every rung. A plan that moves the stop as rungs fill (e.g. to breakeven after the second add) is a different, more dynamic strategy this calculator does not model - rerun it manually with an updated stop if the plan changes mid-sequence. - Even rung spacing only. A plan with irregular level spacing needs the spacing input adjusted per run, or the table read level by level with the entry prices overridden by hand. - The worst-case total assumes every planned rung actually fills before the stop is hit. A partially filled pyramid risks less than the stated budget, never more, since unfilled rungs contribute no risk. - Sends no orders. This is a sizing table, not an order-placement tool - place the resulting entries and pending orders separately. - Rounds lot sizes down to the broker's minimum step; a rung whose fair share is too small to reach the broker's minimum lot is reported and skipped, not force-rounded up past its allotted risk.

Script · MT4 · v1.0 · Free

About Scale In Plan Calculator

Scale In Plan Calculator is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Symbol, Is buy and First entry price. MQL source code included.

Files in the download: ScaleInPlanCalculator.mq4, ScaleInPlanCalculator.txt.

Settings

SettingDefaultWhat it does
SymbolSymbol (blank = current chart symbol)
Is buytruetrue = long pyramid, false = short pyramid
First entry price0.0Price of the first rung
Stop loss price0.0Shared stop for every rung (required, > 0)
Level spacing pips20.0Distance between successive rungs, in pips
Level count4Number of rungs to plan, including the first
Total risk money500.0Total risk budget across ALL rungs, account currency

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria