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

2015.05.14 11:51

MA Lock - indicator for MetaTrader 4

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

Published by:
votes: 18
malock.mq4 (3.07 KB)view

Real author:


This indicator will help define MA (Moving Average) for one specified timeframe only.

When timeframe changes, this indicator automatically adjusts its setting to new timeframe if possible. The idea is "I just want to see how MA(8) from H1 when I am currently on M15" or "I just want to see how MA(100) from M15 when I am currently on H4" .


We want to see how MA(8) locked for H1 to other timeframe, especially for lower timeframes, such as M15, M30, M5, or even larger timeframe H4.

H1: MA(8)  --->  M15: MA(32)  ---> M30: MA(16)  ---> M5: MA(96)  --->  H4: MA(2)

To do this, we bound MA to H1 timeframe with this setting :

  • MATF = 60  (see notes on parameter)
  • MAPeriod = 8

Input parameters:

MALock Setting

MALock(8) on H1 (thin red line) compared with normal MA(8) before switching timeframe:

MALock on H1, compared with normal MA before change timeframe

MALock(8) H1 (thin red line) on M15 compared with normal MA(32).

MALock automatically becomes MA(32):

MALock on H1 on M15

MALock(8) H1 on M30 (equal to MA(16)):

MALock(8) H1 on M30

MALock(8) H1 on H1 and H4:

MALock(8) H1 on H1 and H4

2 MALock:

2 MALock Indicator

Trades to CSV Trades to CSV

Simple EA template to export trade details from a backtest or live trading to a CSV file.

Aeron JJN Scalper EA Aeron JJN Scalper EA

Expert Advisor based on JJN Scalper indicator.

RealValue RealValue

This indicator is my attempt to estimate the real market value.

RealValueExtended RealValueExtended

An extended version of my RealValue indicator with a new parameter.