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

[amibroker] Re: Help *counting* candle patterns



PureBytes Links

Trading Reference Links

> How about AddToComposite ???? 

I use AddToComposite for more complex things, but for simple
statistical  stuff, I'd prefer a simple single pass explore against a
list where I can accumulate some counts and then calculate percentages
or ratios or whatever against the entire list rather than single
issues. For this kind of simple task I consider AddToComposite as a
tool that is too 'heavyweight' (cumbersome?) in the sense that I'd
probably just forget most curious ideas rather than go to the touble.
(Sorry if that sounds lazy).

> If you are after SINGLE values (numbers) it is also possible via
StaticVariables:
> 
> if( Status("StockNum") == 0 ) StaticVarSet("yourvariable", 0 ); //
set to zero at start
> 
> StaticVarSet("yourvariable",   somecalculation +
StaticVarGet("yourvariable") );

I very much like the StaticVariable idea, but I tried the following
code and AFL does not like my version of "somecalculation"...

if( Status("StockNum") == 0 ) StaticVarSet("GapsUp2Pct", 0 );
CondGap = O >= Ref(H, -1) * 1.02;   // Opening Gap up 2% or more 
StaticVarSet("GapsUp2Pct",    Cum(CondGap) +
StaticVarGet("GapsUp2Pct") ); // Accumulate Total # of Gaps in entire list

It won't accept the Cum(CondGap) where you specified the insertion of
"somecalculation", so I assume that might be why you were careful to
state "SINGLE value (numbers)", indicating that normal AFL
calculations cannot take place within the StaticVarSet operation.

Anyway TJ, I hope you see why I had hoped for a simple new variable
type that would persist for the life of an explore AND accept normal
AFL calculations to be performed on them. It would really simplify
quick statistical calculations against entire lists without having to
use AddToComposite.

And don't take the above as a criticism... it is just an idea.

Regards,









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/