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

Re: [amibroker] AFL Assistance - Color Coding of Price Bars( Bill Williams Profitunity Windows )


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] AFL Assistance - Color Coding of Price Bars( Bill Williams Profitunity Windows )
  • From: "MAVIRK" <mvirk67@xxxxxxxxx>
  • Date: Mon, 9 Feb 2009 20:53:57 +0500

PureBytes Links

Trading Reference Links


Sent: Sunday, February 08, 2009 5:14 PM
Subject: [amibroker] AFL Assistance - Color Coding of Price Bars( Bill Williams Profitunity Windows )

Hi Friends,

I've been trying to assign colors to bars based on Bill Williams'
assignments to bar structures (CLIMBERS, DRIFTERS AND NEUTARAL BARS)
without success. The colors do not come out at all. With the AFL
coding below, the only result is Green Bars.

I have limited knowledge of the AFL and definitely need help. The
logic seems in place but my expertise with AFL is wanting. I would
appreciate any assistance with the coding.

R=(H-L);//RANGE;
FR=(H-L)/3;//THIRD OF RANGE;
S1=H-FR;//SEGMENT ONE;
S2=H-2*FR;//SEGMENT TWO;
S3=L;//SEGMENT THREE;

/*POSITION OF OPEN AND CLOSE RELATIVE TO BAR*/

P=IIf(OPEN>S1,1,IIf(S1>OPEN<S2,2,IIf(S2>OPEN<L,3,0)));// POSITION OF
OPENING PRICE ;
CL=IIf(CLOSE>S1,1,IIf(S1>CLOSE<S2,2,IIf(S2>CLOSE<L,3,0)));// POSITION
OF CLOSING PRICE;

/*CONDITIONAL STATEMENTS */

COND_C=(((P=2 OR 3) AND CL=1)) OR (P=3 AND (C=1 OR 2)); //CLIMBERS
COND_D=(P=1 AND (CL=2 OR 3) ) OR (P=2 AND (CL=2 OR 3));//DRIFTERS
COND_N=(P=CL=1 OR 2 OR 3); // NEUTRAL BARS

DYNAMIC_COLOR=IIf(COND_C,colorGreen,IIf(COND_D,col orRed,IIf
(COND_N,colorBlue,colorWhite)));

PlotOHLC( Open, High, Low, Close, "Price chart ",DYNAMIC_COLOR,
styleBar );

Thank you,

Pat Tobin



__._,_.___


**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

__,_._,___