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

[amibroker] Re: How to report intra-bar trade price in Backtest Report



PureBytes Links

Trading Reference Links

Herman, can BuyPrice/SellPrice be any array, or does it need to be 
related to the OHLC-arrays of the security which is being backtested?

Reason for asking: for some secs I have a total-return serie which 
I'd like to use for trades, but I always assumed this was not 
possible if it is not imported under the OHLC fields (which is why I 
used ATC). 

Thx,

PS 
--- In amibroker@xxxxxxxxxxxxxxx, "Herman" <psytek@xxx> wrote:
>
> If i understand you correctly you want to assign prices to the 
BuyPrice and
> SellPrice:
> 
> 
> 
> S1 = MA(O,10);
> 
> S2 = MA(O,50);
> 
> Buy = Cross( H, S1);
> 
> BuyPrice = S1;
> 
> Sell = Cross( S2, L);
> 
> SellPrice = S2;
> 
> Short = Cover = 0;
> 
> Equity(1);
> 
> Plot(S1,"",4,1);
> 
> Plot(S2,"",6,1);
> 
> Plot(C,"",1,128);
> 
> PlotShapes(IIf(Buy,shapeSmallUpTriangle,shapeNone),5,0,BuyPrice,0);
> PlotShapes(IIf
(Sell,shapeHollowDownTriangle,shapeNone),4,0,SellPrice,0);
> 
> Happy New Year!
> 
> herman
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
> Behalf Of itmwh
> Sent: January 1, 2007 10:09 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] How to report intra-bar trade price in Backtest
> Report
> 
> 
> Hi, I have some difficulty in setting up the trade price in the
> backtest report .
> 
> Say I have a simple intraday system, buy  when the price cross up 
the
> 10 unit moving average, and sell when the price cross below the 50 
unit
> moving average on a 1-minute chart.
> 
> Now I hope the backtest report will report the buy/sell trade price 
as
> the price level at which the ma10 or ma50 is crossed , rather than 
the
> OHLC price or the average price of the bar when the moving average 
is
> crossed.  Is there a way to achieving this in the backtest 
analysis ?
> 
> 
> 
> 
> 
> 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.432 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007 2:52 PM