Hope someone has had this problem before. I've never really used the
compression of timeframes. I can get compression to work fine for
SAR's but for the ADX (NDI/PDI) I can't seem to get it to work.
I am using a 5 minute timeframe (with a 1 minute data feed), and the
15 minute only shows the correct signal every 3 bars (and it should
show on every bar I would think). For example, it should show the red
color for, say 15 bars. Instead it shows red, yellow, yellow, red,
yellow, yellow, red...

Any help would be greatly appreciated!

Thanks,
Jim

// 15 minute
TimeFrameSet( in15Minute ); 

nADX2 = ADX(range) ;
nPDI2 = PDI(range);
nMDI2 = MDI(range) ;

TimeFrameRestore(); // restore time frame to original 

nADX2 = TimeFrameExpand(nADX2, in15Minute) ;
nPDI2 = TimeFrameExpand(nPDI2, in15Minute) ;
nMDI2 = TimeFrameExpand(nMDI2, in15Minute) ;

// if the ADX is going up and the PDI is over NDI, then make it green,
// If NDI over PDI then make it red, else make it yellow.
ColorADX2 = IIf(nADX2 > Ref(nADX2,-1), IIf(nPDI2 >
nMDI2,colorGreen,colorRed), colorYellow) ;

Plot(nADX2, "ADX2", ColorADX2, styleDots+styleNoLine );




Reply via email to