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

Re: [amibroker] plot different color if the higher timeframe is trending



PureBytes Links

Trading Reference Links

Murthy,
 
Try this:
 

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: Friday, October 12, 2007 6:04 PM
Subject: [amibroker] plot different color if the higher timeframe is trending

hello
I am using 5 minute chart and want to plot the adx blue if the adx
in 15 minute timeframe is increasing. so i put this piece of code
together. i am not convinced that it works. what i see is that it
shows blue of the 5 minute adx is increasing. am i useing ithe
multitimeframe incorrectly?

_SECTION_BEGIN("ADX");
ADXIncreasingIn15MinuteCompressed=colorBlue;
if (Interval()==60*5){
ADX15MinuteCompressed = TimeFrameCompress( ADX(),
in15Minute );
ADXIncreasingIn15MinuteCompressed=IIf((ADX()>Ref(ADX(),-
1)) ,colorBlue,colorYellow);
ADXIncreasingin15MinuteExpanded=TimeFrameCompress(
ADXIncreasingIn15MinuteCompressed, in15Minute );

}
range = Param("Periods", 14, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ADXIncreasingIn15MinuteCompressed,
ParamStyle("ADX style", styleThick ) );
Plot( PDI(range), "+DI", ParamColor( "+DI color", colorGreen ),
ParamStyle("+DI style") );
Plot( MDI(range), "-DI", ParamColor( "-DI color", colorRed ),
ParamStyle("-DI style") );
_SECTION_END();

seede

__._,_.___

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

__,_._,___