Your words and coloradx2 are speaking different languages.  See if this works:

coloradx2 = iif(adx2 > ref(adx2, -1) and npdi2 > nmdi2, colorgreen, iif(npdi2 > 
npdi2, colorred, coloryellow));

Bill
----- Original Message ----- 
From: "jrswindle2001" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 15, 2007 9:42 PM
Subject: [amibroker] TimeFrameExpand ADX


> 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 );
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.14.12/1072 - Release Date: 10/15/2007 
> 5:55 PM
> 
>

Reply via email to