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

Re: [amibroker] Addition assignment



PureBytes Links

Trading Reference Links

you are trying to add something to itself ?
No such thing as addition assignment +=, at least that I am aware of
If you need to use the previous bar value to calculate the current
value then you need to use either loop or cum function

Point = WhateverCalculation;
Exitrate = cum(point);

if more complex then for loop is needed
assuming point array is already calculated somewhere before this
Point = WhateverCalculation;
Exitrate[0] = Point[0];
for(i=1;i<barcount;i++)
{
  ExitRate[i] = ExitRate[i-1] + Point[i];
}

this allows you to do more complex calcs than just his example

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 12/8/05, Martin Cooney <martin@xxxxxxxxxxxxx> wrote:
> Hi,
>
> Newbie at this but I'd been trying to use an addition assignment but get
> a syntax error 30
>
> e.g.
> ExitRate += Point;
>
> When I replace it with
> ExitRate = ExitRate + Point;
> I get no error. I've seen an example of it's use in the manua; and
> wondered what minor silly thing I'm doing wrong is? Anyone ?
>
> Cheers
> Martin


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/