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

[amibroker] Re: General questions about amibroker


  • Date: Mon, 15 Mar 2010 19:54:15 -0000
  • From: "Rob" <sidhartha70@xxxxxxxxx>
  • Subject: [amibroker] Re: General questions about amibroker

PureBytes Links

Trading Reference Links

Cool... it looks like the penny dropped.
Everyone that starts with AFL goes through the same experience!!!
Just beware that, speaking from my own experience, I thought I'd "got it a few times" and still kept going back to thinking in the iterative bar by bar way... most of the issues I hit with AFL ended up being that error in thinking.

Anyway... honestly I'm not a backtesting expert - more of a live front end expert - I use to AB to day trade real time - executing through my broker. Maybe Mike can help you there on backtesting... But knowing AFL and AB you will a good amount a flexibility as to what executed price you assign in your backtests. First port of call, the help manual, backtesting....


--- In amibroker@xxxxxxxxxxxxxxx, "pipadder" <pipadder@xxx> wrote:
>
> 
> 
> 
> 
> 
> 
> >
> > In answer to your questions... it sounds like you haven't fully grasped the main concept of AFL yet... i.e. that it operates on arrays.
> > 
> 
> Reading the rest of your post... it appears you are right.
> 
> > For example,
> > 
> > Buy = 1;
> > 
> > Sets every element of the Buy array to be 1.
> > Now if you said, 
> > 
> > Buy = IIf (Cross (TimeNum(), 093000), True, False);
> > 
> > This would set every element of the Buy array (no looping required) to a new value based on the outcome of IIf (Cross (TimeNum(), 093000), True, False); (the outcome of that is an array itself - not a number). In this case it would set every element to zero (false) except those where the current time cross 09.30 am...
> > 
> > You just need to play around with it.
> > 
> 
> Aha... this example helps quite a bit. The script/program is applied simultaneously to the whole array, not bar by bar. That was what I was missing. 
> 
> Mmmm... the result (in purely numerical terms, not talking about speed) should of course be the same whether the calculation is simultaneous or looped, but the type of structure fed to the functions in the script (array vs. single variable) is not. I guess that'll be the main difference when programming it. Although if pretty much everything is an array in AFL, even that should be nearly the same.
> 
> Ok, I'll have to get used to thinking this way when coding, but now I *think* I understand that.
> 
> The next thing I wonder about are execution prices... if one of the arrays taking care of order operations (buy/sell/short...) has a "1" for that bar, at what price is the operation executed by the backtester? Always at the closing price of the bar?
> 
> Thanks again for your patience :).
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/