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

[amibroker] Re: Help with Simple Counter



PureBytes Links

Trading Reference Links


for( i = 0; i < BarCount; i++ ) 
{ 
	tc = iif ( i=1, 0, tc+ref(c,i) );
}

--- In amibroker@xxxxxxxxxxxxxxx, "Mike Mann" <mikemann@xxxx> wrote:
> 
> I'm new at this and I would like simple code to count the results of 
> an array for a variable number of bars back without using the REF 
> function to add them all up.
> 
> Example:
> 
>  TC = Count + Ref(Count, -1) + Ref (Count,-2) + Ref (Count, -3) + 
> Ref (Count,-4);
> 
> Can anyone help me with the code to simply add up the results of any 
> array for "N" number of bars back?
> 
> Thank you for your help.
> 
> Mike





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/