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

[amibroker] Assistance request with modified ADX...please...



PureBytes Links

Trading Reference Links

With the attached coding, the colorbar1 switches with the crossover of
PDI() and MDI().  Here is what I am trying to achieve...

When the PDI()>MDI() and the gap between the two is greater today than
yesterday than use colorgreen in colorbar1...otherwise, use colorred
in colorbar1 for that day.

When the MDI()>PDI()and the gap between the two is greater today than
yesterday than use colorred in colorbar1...otherwise, use colorgreen
in colorbar1 for that day. 

I have tried a number of different ways but have been unsuccessful. 
Any help will be greatly appreciated!

range = Param("Periods", 14, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue
), 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") );

V1=PDI();
V2=MDI();
V3=V1-V2;	//diff when PDI>MDI...
V4=V2-V1;	//diff when MDI>PDI...
ColorBar1 = IIf(V1 > V2,colorGreen,colorRed);



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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/