Plus 2 indicators with differents Time Frames

 

So I want to plus the same indicator of 2 differents time frames and build new one.

I would apreciate any example or any help. There are too much information and is difficult to find that I want, but I'm sure I'm not the first who want to do something like this.

Thanks in advance. 

 
Do you mean in one timeframe showing 2 timeframes the same indicator?
 
Similar but no I plus the buffer of one timeframe to the other, I made it doing something similar that you say, first I made this indicator in different time frame and later calling this indicator into the otherone with iCustom.
Cheer for your answer but It's fixed. I know it's rare but the buffer represents the probability and works better calculating in more than one time frame and adding others.
 
Thanks for your interest if some day you need help write me by private message I will try to help you quickly.
 

Do not know if this can serve you ...

 

 //+-----------------------------------------------------------------+

// | SARDOS.mq4 |

//+------------------------------------------------------------------+

#property indicator_chart_window

#property show_inputs

#property indicator_color1 Aqua

#property indicator_color2 Red

#include <stdlib.mqh>

#poperty indicator_buffers 2                                        ;

double ExtMapBuffer1[255]                                            ;

double ExtMapBuffer2[255]                                            ;

double ExtParam1 = 100                                               ;


extern int Frame1, Frame2, Ratio                                     ;

//+------------------------------------------------------------------+

//| Custom indicator initialization function                         |

//+------------------------------------------------------------------+

int OnInit()

// --- Indicator 0

   SetIndexStyle(0,DRAW_ARROW)                                       ;

   setındexbuff (0, extmapbuffer1);   

   setındexarrow (0.159); 

   setındexemptyvalu A (0,0.0);

   setındexdrawbeg the (0, extparam1);

// --- Indicator 1

   SetIndexStyle(1,DRAW_ARROW)                                       ;   

   setındexbuff (1, extmapbuffer2);   

   setındexarrow (1.108);        

   setındexemptyvalu A (1,0.0);

   setındexdrawbeg (1, extparam1);

 

   ArrayResize(ExtMapBuffer1, Bars )                                 ;

   ArrayResize(ExtMapBuffer2, Bars )                                 ;

//---

   return(INIT_SUCCEEDED)                                            ;

}

//+------------------------------------------------------------------+

// | Custom indicator deinitialization function |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

{  

//---- 


//----

}   

//+------------------------------------------------------------------+

//|                Script program start function                     |

//+------------------------------------------------------------------+

int OnCalculate(const int rates_total,

                const int prev_calculated,

                const datetime &time[],

                const double &open[],

                const double &high[],

                const double &low[],

                const double &close[],

                const long &tick_volume[],

                const long &volume[],

                const int &spread[])

{

int nCont = Ratio, m = 0                                             ;

//-------------------------------------------------------------------+

Properties // lines |

//-------------------------------------------------------------------+

   for(int n=0;n< Bars;n++)

       {

        ExtMapBuffer1[n] =  iSAR(NULL,Frame1,0.02,0.2,n )            ;        

        if( n != nCont )

           {

            ExtMapBuffer2[n] = iSAR(NULL,Frame2,0.02,0.2,m )         ;

           }

        else

           {

            ExtMapBuffer2[n] =  iSAR(NULL,Frame2 ,0.02,0.2,m + 1 )   ; 

            nCont =    nCont + Ratio                                 ;

            m = m + 1;

           }

       }

//+-----

   return(rates_total);

}

Reason: