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

Re: [amibroker] Backtesting Calculation - Real Time 'state' information.



PureBytes Links

Trading Reference Links

Actually, I do not think you can do what pmxgs wants in AFL.   

AFL recalculates all variables on every tick/pass thru the formula. This happens with every new 'tick' when using a Real/Time data source.

This isn't an issue with an EOD strategy, but in RealTime.. it's a huge issue.  

For example .. if you need to know if the LOW or HIGH happens first, then you would need to record or 'latch' this event and have it available to your formula on the next intraday 'tick'.  You can't just set a variable for this. The next intraday data tic.every tick will reset/recalc all variables.  .. effectively  erasing our knowledge that the LOW-Hit event happened first.

You might think that the flip() function would do the job .. but it suffers from the same problem.  It's only valid on bar close.
The only way I know of to do this is with a staticvar.. and that's pretty cumbersome.    And I'm not sure if they are even evaluated during a backtest.

There's a long chain of posts over in the amibroker-at group about this problem.  
http://finance.groups.yahoo.com/group/AmiBroker-at/message/2191

I'd love to be wrong about this.. so please chime in and correct me if you have a solution !
(And fwiw, a solution/fix for this problem  would go to the very top of my list vs any new charting features!!!) 
----- Original Message ----
From: dingo <dingo@xxxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Monday, February 19, 2007 8:41:42 AM
Subject: RE: [amibroker] Backtesting Calculation

The only way Tradestation can do this accurately is by use of intraday data.
Using EOD data its only a guess.  If you use intraday data then Amibroker
can do it as well.

d 

> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx 
> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of pmxgs
> Sent: Saturday, February 17, 2007 8:26 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Backtesting Calculation
> 
> Hi,
> 
>  I'm searching for a back testing software and I'm positively
> impressed with amibroker. 
>   But there's one thing that i would like to know.
>  When amibroker back tests some strategy can we select if inside bar
> data is evaluated? 
>  For example , imagine that my trading system evaluates daily bars and
>  has a limit take profit order for a stock at $50 and a stop loss
> order at $46. This bar opened and closed at $48 with high at 51 and
> low at 45.
> How does amibroker know which one was hit first. The high or the low?
>  As long as there is intrabar data available this should be considered
> when back testing results are being calculated, otherwise the results
> will not be correct.
>   Tradestation has this feature (look inside bar feature), have a look
> here: www.adest.com.au/software/tradestation%202000i.htm
> 
>  Hope someone can answer me,
>  thanks
> 
> 
> 
> 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








Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/693 - Release Date: 2/19/2007 5:01 PM