Envelope1
Envelope1 is an expert advisor (trading robot) for MetaTrader 4 from the Old Kings collection. Its source code uses moving averages and a price channel. It places pending orders, moves the stop behind price and has a trading-hours filter. It has 20 settings, for example Env Time Frame (default 5), Envelope Period (default 144) and Env Ma Method (default 1). Watch it on a demo account for a while — robots can behave differently with each broker. 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 Envelope1
Envelope1 is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average and Channels & Envelopes. It places pending buy/sell stop or limit orders, moves the stop loss behind price (trailing stop / break-even) and trades only in the hours you set (time filter). It has 20 settings, such as Env time frame, Envelope period and Env ma method. MQL source code included.
It also can size trades from your balance and risk percent.
Files in the download: Envelope1.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 |
|---|---|---|
| Env time frame | 5 | envelope time frame: 0=chart,60=1hr,240=4hr, etc. |
| Envelope period | 144 | moving average length |
| Env ma method | 1 | 0=sma,1=ema,2=smma,3=lwma. |
| Ma shift | 0 | shift relative to current bar indicator data is posted |
| Envelope deviation | 0.4 | envelope width |
| Ma eline tsl | 0 | see notes below |
| Break even pips | 1 | pips above/below OrderOpenPrice for breakeven SL |
| Fast ma period | 55 | FastMaTSL moving average length |
| Fast ma method | 0 | 0=sma,1=ema,2=smma,3=lwma. |
| Fast ma shift | 0 | shift relative to current bar indicator data is posted |
| Fixed pip tsl pips | 0 | pips to trail |
| Fixed pip tsl trigger | 0 | pips in profit before trailing stoploss is triggered |
| Time begin | 0 | server time order placement begins |
| Time end | 18 | server time order placement ends |
| Time delete | 23 | server time unexecuted orders deleted |
| First tp | 21.0 | 1st TP in pips |
| Second tp | 34.0 | 2nd TP in pips |
| Third tp | 55.0 | 3rd TP in pips |
| Maximum risk | 0.02 | %account balance to risk per position |
| Decrease factor | 3 | lot size divisor(reducer) during loss streak |
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: Channels & Envelopes · Pending Orders · Trailing Stop & Break-even · Time Filter · Risk & Lot Size · Moving Average · MT4 Expert Advisor · MQL4 Source Code