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

Re: [amibroker] TJ: AWK like BEGIN/END structure in AA for Composites?



PureBytes Links

Trading Reference Links

Richard,

I will take another approach, that will allow what you suggest and more. But it is now too soon to unveil all the details.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Richard Alford" <richard.alford@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, July 13, 2002 4:38 PM
Subject: [amibroker] TJ: AWK like BEGIN/END structure in AA for Composites?


> Tomasz, when constructing composites, such as a simple buy/sell ratio it
> would be very useful to have a BEGIN/END structure in the AA window. I
> presume you are familiar with AWK but for the happily uninitiated the
> structure of awk and the AA are similar: the AA runs over each series behind
> the scenes - there is an implied "for each selected". What is lacking is
> the BEGIN/END control structure, for example:
> 
> BEGIN: {" perhaps import Foreign function one time to scale each by"}
> 
> // create #buys and sells based on ma
> B = IIF(C>MA(C,len),1,0);
> S = IIF(C<MA(C,len),1,0);
> 
> Addtocomposite(B,"Buys",C);
> Addtocomposite(S,"Sells",C);
> 
> END: { BSR = Foreign("BUYS",C)/Foreign("Sells",C) }
> 
> 
> This would perform a single operation at the end. Another example would be
> to scale the result by the max of the series.
> 
> I personally feel this would enhance the already strong composite
> capabilities of AB significantly. I realize you are just sitting around
> trying to think of something to do....
> 
> Comments?
> 
> Richard
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>