Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

MA Lock - MetaTrader 4 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 3 reads | 0 comments |

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4

This indicator will help to define the MA (Moving Average) within a specified time frame only.

When the time frame changes, the indicator automatically adjusts its settings to the new time frame if possible. The idea is "I just want to see the MA(8) from H1 when I'm currently at M15" or "I just want to see the MA(100) from M15 when I'm currently at H4".

We would like to see how MA(8) locks H1 to other timeframes, especially lower timeframes such as M15, M30, M5, and even the larger timeframe H4.

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

To do this, we bind the MA to the H1 timeframe using the following settings:

Input parameters:

MA Lock - indicator for MetaTrader 4

MALock(8) on H1 (thin red line) compared to normal MA(8) before switching time frames:

MA Lock - indicator for MetaTrader 4

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

MALock automatically becomes MA(32):

MA Lock - indicator for MetaTrader 4

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

MA Lock - indicator for MetaTrader 4

MALock(8) H1 on H1 and H4:

MA Lock - indicator for MetaTrader 4

MA Lock - indicator for MetaTrader 4


Attachment download

📎 malock.mq4 (3.07 KB)

Source: MQL5 #12728

Verification code Refresh