Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.01.26 11:12

Envelopes - indicator for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 20
envelopes.mq5 (4.21 KB)view


Envelopes technical indicator is formed with two Moving Averages, one of which is shifted upward and another one is shifted downward. The selection of optimum relative number of band margins shifting is determined with the market volatility: the higher the latter is, the stronger the shift is.

Envelopes define the upper and the lower margins of the price range. Signal to sell appears when the price reaches the upper margin of the band; signal to buy appears when the price reaches the lower margin.

The logic behind envelopes is that overzealous buyers and sellers push the price to the extremes (i.e., the upper and lower bands), at which point the prices often stabilize by moving to more realistic levels. This is similar to the interpretation of Bollinger Bands ® (BB).


Envelopes indicator

Envelopes indicator


UPPER BAND = SMA (CLOSE, N) * [1 + K / 1000]
LOWER BAND = SMA (CLOSE, N) * [1 - K / 1000]


  • UPPER BAND - upper line of the indicator;
  • LOWER BAND - lower line of the indicator;
  • SMA - Simple Moving Average;
  • CLOSE - close price;
  • N - period of averaging;
  • K / 1000 - the value of shifting from the average (measured in basis points).

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.