Once Per Bar Expert 2
Once Per Bar Expert 2 — a MetaTrader 4 expert advisor (trading robot) kept in the Old Kings collection. It places pending orders, can size trades from your risk and has a news filter. It has 40 settings, for example Priceoffset (default 13.0), inp2 (default (2) Once per bar) and inp2 TIMEFRAME (default PERIOD_H4). Before any live use, test it on a demo account and check its lot size, stop loss and trading hours. Inside: 1 EA 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.
Expert advisor · MT4 · v1.0 · Free
About Once Per Bar Expert 2
Once Per Bar Expert 2 is an expert advisor (trading robot) for MetaTrader 4. It places pending buy/sell stop or limit orders, can size trades from your balance and risk percent and has a news filter. It has 40 settings, such as Priceoffset, Inp2 and Inp2 timeframe. MQL source code included.
Files in the download: once per bar expert.mq4.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Priceoffset | 13.0 | Price offset |
| Inp2 | (2) Once per bar | |
| Inp2 timeframe | PERIOD_H4 | Period or timeframe used by the calculation |
| Inp2 pass max times | 1 | |
| Inp3 | (3) Close trades | |
| Inp3 orders scope | group | |
| Inp3 symbol scope | symbol | |
| Inp3 buys or sells | both | |
| Inp4 | (4) Delete pending orders | |
| Inp4 orders scope | group | |
| Inp4 symbol scope | symbol | |
| Inp4 buys or sells | both | |
| Inp4 limits or stops | both | |
| Inp5 orders group | ||
| Inp5 d price candle id | 1 | |
| Inp5 d price timeframe | 0 | Period or timeframe used by the calculation |
| Inp5 price offset | 10 | |
| Inp5 volume size | 0.01 | |
| Inp5 dl stop loss candle id | 1 | Stop loss distance |
| Inp5 take profit pips | 100 | Take profit distance |
| Inp6 | (6) Sell pending order | |
| Inp6 orders group | ||
| Inp6 d price candle id | 1 | |
| Inp6 d price timeframe | 0 | Period or timeframe used by the calculation |
| Inp6 price offset | 10 | |
| Inp6 volume size | 0.01 | |
| Inp6 dl stop loss candle id | 1 | Stop loss distance |
| Inp6 take profit pips | 100 | Take profit distance |
| Inp7 on profit pips | 40 | |
| Inp7 be poffset pips | 5 | |
| Inp7 orders scope | group | |
| Inp7 symbol scope | symbol | |
| Inp7 buys or sells | both | |
| Inp8 orders scope | group | |
| Inp8 symbol scope | symbol | |
| Inp8 buys or sells | both | |
| Inp9 orders scope | group | |
| Inp9 symbol scope | symbol | |
| Inp9 buys or sells | both | |
| Inp9 limits or stops | stops |
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 → Experts.
- 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 expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: Pending Orders · Risk & Lot Size · News Trading · MT4 Expert Advisor · MQL4 Source Code