Herman Thanks very much for the quick reply, you are always so generous to help the other people. I did not know that I can use" buyprice" and "sell price" to indicate the specific price in the codes, tomorrow I will test this method. But now I have to go to sleep , it's just past midnight here. Happy 2007 and wish you a prosperous year !
Tom in Shanghai, China ----- Original Message ----- From: Herman To: [email protected] Sent: Monday, January 01, 2007 11:46 PM Subject: RE: [amibroker] How to report intra-bar trade price in Backtest Report 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: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of itmwh Sent: January 1, 2007 10:09 AM To: [email protected] 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
