Position Size Calculator 2
Position Size Calculator 2 — a MetaTrader 4 indicator kept in the Old Kings collection. Its source code uses ATR. It can send alerts. It has 33 settings, for example Show Line Labels (default true), Draw Text As Background (default false) and Panel On Top Of Chart (default true). Load it on a demo chart and check whether its signals repaint before trusting them. Inside: 1 indicator file with source code (.mq4) you can open and edit in MetaEditor. Old Kings are classic community tools shared as-is. Not tested by PolyMaria. Try it on a demo account first. Are you the author of this tool? Message us on Telegram (@abumarket_support) and we will credit you or take it down.
Indicator · MT4 · v1.0 · Free
About Position Size Calculator 2
Position Size Calculator 2 is an indicator for MetaTrader 4 based on ATR. It can alert you with a pop-up, sound, email or push message. It has 33 settings, such as Show line labels, Draw text as background and Panel on top of chart. MQL source code included.
Files in the download: Defines.mqh, PositionSizeCalculator.mq4, PositionSizeCalculator.mqh.
Settings
| Setting | Default | What it does |
|---|---|---|
| Show line labels | true | ShowLineLabels: Show pip distance for TP/SL near lines? |
| Draw text as background | false | DrawTextAsBackground: Draw label objects as background? |
| Panel on top of chart | true | PanelOnTopOfChart: Draw chart as background? |
| Hide acc size | false | HideAccSize: Hide account size? |
| Show pip value | false | ShowPipValue: Show pip value? |
| Sl label font color | clrLime | SL Label Color |
| Tp label font color | clrYellow | TP Label Font Color |
| Font size | 13 | Labels Font Size |
| Font face | Courier | Labels Font Face |
| Entry line color | clrBlue | Entry Line Color |
| Stoploss line color | clrLime | Stop-Loss Line Color |
| Takeprofit line color | clrYellow | Take-Profit Line Color |
| Entry line style | STYLE_SOLID | Entry Line Style |
| Stoploss line style | STYLE_SOLID | Stop-Loss Line Style |
| Takeprofit line style | STYLE_SOLID | Take-Profit Line Style |
| Entry line width | 1 | Entry Line Width |
| Stoploss line width | 1 | Stop-Loss Line Width |
| Takeprofit line width | 1 | Take-Profit Line Width |
| Risk | 1 | Risk: Initial risk tolerance in percentage points |
| Entry type | Instant | EntryType: Instant or Pending. |
| Commission | 0 | Commission: Default one-way commission size. |
| Commentary | Commentary: Default order comment. | |
| Default sl | 0 | DefaultSL: Deafault stop-loss value, in broker's pips. |
| Default tp | 0 | DefaultTP: Deafault take-profit value, in broker's pips. |
| Default atr timeframe | PERIOD_CURRENT | DefaultATRTimeframe: Deafault timeframe for ATR. |
| Tp multiplier | 1 | TP Multiplier for SL value, appears in Take-profit button. |
| Use commission to set tp distance | false | UseCommissionToSetTPDistance: For TP button. |
| Show spread | false | ShowSpread: If true, shows current spread in window caption. |
| Additional funds | 0 | AdditionalFunds: Added to account balance for risk calculation. |
| Use fixed sl distance | false | UseFixedSLDistance: SL distance in points instead of a level. |
| Use fixed tp distance | false | UseFixedTPDistance: TP distance in points instead of a level. |
| Show atr options | false | ShowATROptions: If true, SL and TP can be set via ATR. |
| Disable tick value adjustment | false | DisableTickValueAdjustment: If true, use unadjusted tick value. |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Risk & Lot Size · Alerts · ATR · MT4 Indicator · MQL4 Source Code