Hello,
I am adding Moving average indicator with Period 5, Shift 0, Method Linear weight, apply to close price to GBPUSD Chart. I want this same value 3 moving average indicator for same currency pair for 3 time frame (1 Min, 5 Min and 15 Min). I can do this by adding the moving average by opening 3 different chart with same currency pair (Symbol) with different timeframe but i have to see 3 windows.
I want to add all 3 different timeframe moving average to one single chart. ? How can i do that?
This is not possible by default. You would need a custom indicator. You can search on the code base and market sections. If not found you can try hire someone in the freelancer section.
Ok, Got it. i am trying something like this with code
iMA(NULL,1,5,0,MODE_LWMA,PRICE_CLOSE,0); iMA(NULL,5,5,0,MODE_LWMA,PRICE_CLOSE,0); iMA(NULL,15,5,0,MODE_LWMA,PRICE_CLOSE,0);
But indicators are not displaying on chart and as well as no way to add colour to each indicator?
- anuj71 #: Ok, Got it. i am trying something like this with code
iMA(NULL,1,5,0,MODE_LWMA,PRICE_CLOSE,0); iMA(NULL,5,5,0,MODE_LWMA,PRICE_CLOSE,0); iMA(NULL,15,5,0,MODE_LWMA,PRICE_CLOSE,0);
Don't hard code constants. Use the proper constants.
- anuj71 #: But indicators are not displaying on chart and as well as no way to add colour to each indicator?
Of course, it does not display on the chart. EAs have no eyes; they don't need it displayed. If you want to see them, find a multi-timeframe (MTF) equivalent.
-
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
MT5: create them. - Cloud Protector Bug? - MQL4 programming forum (2020)
-
Don't hard code constants. Use the proper constants.
-
Of course, it does not display on the chart. EAs have no eyes; they don't need it displayed. If you want to see them, find a multi-timeframe (MTF) equivalent.
-
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
MT5: create them. - Cloud Protector Bug? - MQL4 programming forum (2020)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I am adding Moving average indicator with Period 5, Shift 0, Method Linear weight, apply to close price to GBPUSD Chart. I want this same value 3 moving average indicator for same currency pair for 3 time frame (1 Min, 5 Min and 15 Min). I can do this by adding the moving average by opening 3 different chart with same currency pair (Symbol) with different timeframe but i have to see 3 windows.
I want to add all 3 different timeframe moving average to one single chart. ? How can i do that?