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

[amibroker] Help with arrays



PureBytes Links

Trading Reference Links

I'm totally new to Amibroker and am trying to figure out how its 
array works. I have quite extensive experience with C programming and 
understand that AFL works pretty much like C. However, when I try 
programming with arrays, I get very unpredictable results...

For instance, with the code below, I would expect the system to buy 
when the close is greater than 200 (it does this as expected). I 
thought it should sell the next day, since I wrote Sell [i+1] = 1. 
However, the system sells on the same day instead.

I know I'm missing something here. Any help will be very much 
appreciated.

Btw, just wondering if there's any other books/reference guides out 
there on AFL, besides the user guide. Thanks.

--------------------------------
Buy = C > 200;
Sell = 0;

for (i=0; i< BarCount; ++i)
{
	if (Buy [i] AND i+1<BarCount)
		Sell [i+1] = 1;
}





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/