How to add different Timeframe Moving Average and RSI indicator in one chart

 

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?

 
anuj71:

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.
 
Samuel Manoel De Souza #:
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?

 
  1. 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.

  2. 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.

  3. Be careful with NULL.

    1. 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.
    2. 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.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
      MT5: create them.
    5. Cloud Protector Bug? - MQL4 programming forum (2020)

 
William Roeder #:
  1. Don't hard code constants. Use the proper constants.

  2. 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.

  3. Be careful with NULL.

    1. 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.
    2. 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.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
      MT5: create them.
    5. Cloud Protector Bug? - MQL4 programming forum (2020)

Can you help me with Sample code? How can i do this?
 
anuj71 #: Can you help me with Sample code? How can i do this?

Do what?
          Be precise and informative about your problem