[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] TimeFrameExpand ADX



PureBytes Links

Trading Reference Links

Jim,
 
Don't know if you searched the archives or not.
 
Here is something I posted few days ago.  You can use this as a base and build on it.
 
 
=================
 

TimeFrameSet( 1/4*inHourly ); // switch now to 1/4 hour (15mins)

ADXIncreasingIn15Minute=ADX()>Ref(ADX(),-1);

TimeFrameRestore();

 

///Now in 5mins

ADXIncreasingIn15Minute_expandedto5mins=TimeFrameExpand(ADXIncreasingIn15Minute,,1/4*inHourly,expandFirst);

 

Now use ADXIncreasingIn15Minute_expandedto5mins to do the coloring logic etc.

 

Cheers,Padhu

============================================================

----- Original Message -----
Sent: Monday, October 15, 2007 8: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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___