PureBytes Links
Trading Reference Links
|
Hi all
I've figured out what's wrong... can't really explain this clearly...
but seems like the first sell signal I got was in response to a buy
signal that was out of my testing range (and thus not reported)...
the code works as expected now when I add in the following quote:
// first filter out buy signals occuring outside testing range
Buy = Buy AND Status("barinrange");
Thanks a lot.
--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxx> wrote:
>
> Check your trade delay settings in AA.
>
> In general terms, AFL array processing is quite different from C,
since C is
> not an array based structure.
>
> I had a difficult time adjusting to array processing, but it is
extremely
> efficient and the sooner you give up writing loops, the better you
will be.
>
> Simply saying:
> Buy = BuyCondition;
> Sell = SellCondition;
>
> will be significantly faster
>
>
> ----- Original Message -----
> From: "jl2012_30" <jl2012_30@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, July 06, 2007 8:23 AM
> Subject: [amibroker] Help with arrays
>
>
> > 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
> >
> >
> >
>
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/
|