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

[amibroker] AFL code query



PureBytes Links

Trading Reference Links

Hi All,

Probably a very simple code enquiry.

I have an array whose 'current' value I want to use to define the
length of a for...next loop.

Lets say,

DCPeriod=int(SmoothPeriod+0.5);
for(Countx=0;Countx==DCPeriod-1;Countx++)
{
RealPart=RealPart+sin(DTR*(360*(I2/Q2))*(SmoothX[Countx]));
ImagPart=ImagPart+cos(DTR*(360*(I2/Q2))*(SmoothX[Countx]));
}

Obviously this won't work... because DCPeriod is an array.

My question how do I access the 'last' value of DCPeriod...?

I have tried LastValue(DCPeriod) and it doesn't match DCPeriod when I
output them to the title bar for error checking...

What am I doing wrong guys...?



------------------------------------

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 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
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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