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

[amibroker] What am I overlooking in generating color bar???



PureBytes Links

Trading Reference Links

I am trying to generated a green/red colorbar across the bottom of the
indicator plot.  I have it working properly in a number of other
indicator plots, but not this one.  The value of the color array is
displayed in the interpertation window and changes between green and
red as the vertical cursor is moved across the screen.  However, the
colorbar is a solid color all the way across the screen. As the screen
is shifted left or right the colorbar will change to all green or all red.

Any assistance is appreciated.

_SECTION_BEGIN("ModADX");
range = Param("Periods", 14, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue
), ParamStyle("ADX style", styleThick ) );
Plot( MA(PDI(range),5), "+DI", ParamColor( "+DI color", colorGreen ),
ParamStyle("+DI style") );
Plot( MA(MDI(range),5), "-DI", ParamColor( "-DI color", colorRed ),
ParamStyle("-DI style") );

V1=MA(PDI(),5);
V2=MA(MDI(),5);
V3=V1-V2;	//Value>0=PDI>MDI...value<0 then MDI>PDI...
if (V3[BarCount-1]>0)
	Color = IIf( V3[BarCount-1]>V3[BarCount-2], colorGreen,colorRed); 
else
	Color = IIf( V3[BarCount-1]<V3[BarCount-2], colorRed,colorGreen); 

Plot( 4, "ColorBar", Color, styleArea | styleOwnScale,-0.1,100);
printf("V3*********\n");
WriteVal(V3);
printf("Color**********\n");
WriteVal(Color);
_SECTION_END();



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/