Hi All,
I was wondering if there is a sample on how to code the following example.
Let say I have a stochastic indicator that is running on a Time Frame H1.
I would like to get the value of this indicator TF H1 on a TF M5.
With the above code I could only get the value every H1 on what every time frame.
Q : Let say I am on a M5 TF, Is it possible to get the value every 5 minute without having to wait 1 hour.
Please advice and thanks you.
I was wondering if there is a sample on how to code the following example.
Let say I have a stochastic indicator that is running on a Time Frame H1.
I would like to get the value of this indicator TF H1 on a TF M5.
Inserted Code
int start() { datetime TimeArray[]; int i,y,limit,counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; // Plot defined timeframe on to current timeframe ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame); limit=Bars-counted_bars; limit=MathMax(limit,TimeFrame/Period()); for(i=0,y=0;i<limit;i++) { if (Time[i]<TimeArray[y]) y++; /*********************************************************** Add your main indicator loop below. You can reference an existing indicator with its iName or iCustom. Rule 1: Add extern inputs above for all neccesary values Rule 2: Use 'TimeFrame' for the indicator timeframe Rule 3: Use 'y' for the indicator's shift value **********************************************************/ ExtMapBuffer1[i]=iCustom(NULL,TimeFrame, "%Stoc_Combne",0,y); }
With the above code I could only get the value every H1 on what every time frame.
Q : Let say I am on a M5 TF, Is it possible to get the value every 5 minute without having to wait 1 hour.
Please advice and thanks you.