Gann MTF

 
seqential:

#MTF_RSI uses an array to push timeframes thru RSI. I'd like to do the same thing with the Gann indicator. My problem is that the Timeframe array counts up while the Gann indicator counts bars down from the lookback (period). I can't get my head around this. If anybody has got a solution for this I would be greatful.

Thanks, KJ

Hi KJ,

I'm just a novice coder and may not understand the problem of stepping through the 'time array"...but if you look at the #MTF_RSI code you will see that it sets the time frame as an extern int and places it in the ExtMapBuffer variable...and in the time array.

ExtMapBuffer1=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y) ;

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

The Gann Indicator does not seem to have a time array, so follow the #MTF_RSI code and replace all

iMA("Null,0" ...with

iMA("Null,TimeFrame"...

and place the extern int TimeFrame = 0; at the top.

This should make the Gann indicator MTF.

Hope this helps,

Robert

 

Substituting timeframe for MA doesn't work because the Bar count is based on the current timeframe. I've tried multiplying Bars*TImeFrame and adding/removing TimeFrame from the iMA calls but nothing to seems to work. I think the key is this MTF indicator.

 

I figured out how to get an MTF Gann line drawn.....

Use an MTF MA in place of iMA. There's a couple of them online...Google It!

Reason: