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

Re: {Disarmed} Re: [amibroker] plotshapes changes array?



PureBytes Links

Trading Reference Links

Thanks everyone. However, none of the suggestions work.

My intent is to highlight a bar if it is longer than any of the preceding 3 ones.

Currently, any incarnation of this formula, highlights all bars.

Thanks again,

Anthony

wavemechanic wrote:

Oh, forgot to mention that your wr4 iif() is wrong.  Should be iif(d1 > d2 or d1 > d3 or ... and not iif(d1 > (d2 or d3 or d4) ...
 
Bill
----- Original Message -----
Sent: Monday, December 03, 2007 4:38 PM
Subject: Re: [amibroker] plotshapes changes array?

The first plotshapes() is not constructed properly but your second one works OK.  Using the code shown on the chart produces what you want.
 
Bill
 
 
----- Original Message -----
From: "Anthony C. Abry" <abry@xxxxxxxxxcom>
Sent: Sunday, December 02, 2007 9:30 PM
Subject: [amibroker] plotshapes changes array?

> 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 );
 


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.13/1165 - Release Date: 12/2/2007 8:34 PM
__._,_.___

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

__,_._,___