The condition to enter the trade is still missing, you need the following to enter on stop...
(Trade delays set to zero) Trigger = cond1 etc... // Trigger conditions day before entry StopEntry = High; // Stop Entry Price Buy = ref(Trigger,-1) and H >= ref(StopEntry,-1); // Enter on stop today if High exceeds stop entry order price BuyPrice = max(Open, ref(StopEntry,-1)); // Entry price accounting for gaps Cheers, Dave ----- Original Message ----- From: kmunnecke To: [email protected] Sent: Sunday, April 20, 2008 9:37 PM Subject: [amibroker] Re: Buy stop and sell stop instead of backtester setting options. SetTradeDelays (0,0,0,0); Buy = Condi1 AND Condi2 AND Condi3 ; // kaufbedingungen Buystop = Ref (H,-1); BuyPrice = Max (Buystop,Low); // kaufpreis +--- In [email protected], "alta hob" <[EMAIL PROTECTED]> wrote: > > Hi > > > I am using the backtester in AB and when a trade is triggered the > "backtester setting" option is being used which is currently set at "open". > So my backtesting results show the opening price as the open of the next bar > which is wrong for my testing. > > > The price I actually want to enter at is High > Ref( High, -1 ); and I want > to have a buystop at this price and not use the open price of a bar. > > > Anyone know how to do this please? > > thanks > AH >
