Calculate Balance Lots UKOIL
Calculate Balance Lots UKOIL — MT5 script, supplied with source code and a compiled file. Source metadata: ID 1743: Calculate Balance Lots UKOIL Source algorithm identifier: CALCULATE_BALANCE_LOTS. Declared inputs include: MagicFilter, SymbolOverride, SlippagePoints, MaxAttempts, MaxQuoteAgeSeconds, FixedLot, RiskPercentValue, StopLossMode, StopLossValue, TakeProfitMode, TakeProfitValue, ATRPeriod, ATRMultiplier, MarginUsePercent, EquityPerLot, BalancePerLot. Description extracted from the supplied source metadata. Compilation compatibility, runtime behavior and trading results have not been independently verified.
Script · MT5 · v1.0 · Free
About Calculate Balance Lots UKOIL
Calculate Balance Lots UKOIL is a script for MetaTrader 5 based on ATR. It has 17 settings, such as Magic filter, Symbol override and Slippage points. MQL source code included.
Files in the download: Calculate_Balance_Lots_UKOIL_MT5.mq5, Calculate_Balance_Lots_UKOIL_MT5.ex5.
Settings
| Setting | Default | What it does |
|---|---|---|
| Magic filter | -1 | -1 means all magic numbers, still TargetSymbol only. |
| Symbol override | Explicit exact broker symbol override; blank uses catalog target. | |
| Slippage points | 30 | Maximum slippage allowed when opening a trade |
| Max attempts | 3 | |
| Max quote age seconds | 120 | |
| Fixed lot | 0.10 | Trade size in lots |
| Risk percent value | 1.0 | Risk per trade (percent of balance) |
| Stop loss mode | PipsMode | Stop loss distance |
| Stop loss value | 50.0 | Stop loss distance |
| Take profit mode | PipsMode | Take profit distance |
| Take profit value | 100.0 | Take profit distance |
| Atr period | 14 | Period or timeframe used by the calculation |
| Atr multiplier | 2.0 | How much the lot size grows after a loss |
| Margin use percent | 10.0 | |
| Equity per lot | 10000.0 | |
| Balance per lot | 10000.0 | |
| Calculation order type | ORDER_TYPE_BUY |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: ATR · MT5 Script · MQL5 Source Code