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

[amibroker] plotshapes changes array?



PureBytes Links

Trading Reference Links

Hi,

I am fighting with the usage of plotshapes.

My goal is to highlight widerange bars (WR4) on a chart. WR4 is true if 
1 and not true if -1. The formula seems to calculate everything 
correctly as cross checked within exploration and addcolumns. However, 
when trying to plot this with the plotshapes command on top of the bar, 
it will change the WR4 value to 1 and plot it on every single bar. I got 
2 version of the plotshape command in there for you to look at. Any help 
would be greatly appreciated.

Anthony

---------------------------------------------------------------

// WR4 show me //

D1 = H-L;
D2 = Ref(H,-1)-Ref(L,-1);
D3 = Ref(H,-2)-Ref(L,-2);
D4 = Ref(H,-3)-Ref(L,-3);

WR4 = 0;

WR4 = IIf(D1 > (D2 OR D3 OR D4),1,-1);

//IIf (WR4 = 1,(PlotShapes( shapeSmallSquare, colorYellow, 0, H * 1.03 
)),PlotShapes(shapeNone,colorGreen));
//PlotShapes( IIf( WR4 > 0, shapeSmallSquare, shapeNone ), colorYellow, 
0, H * 1.03);
 
Filter = WR4;

AddColumn( D1, "D1", 1.4 );
AddColumn( D2, "D2", 1.4 );
AddColumn( D3, "D3", 1.4 );
AddColumn( D4, "D4", 1.4 );
AddColumn( WR4, "WR4", 1.4 );





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/