Frank --
I ran into a similar problem about 3 months ago. I suggest you take a
look at the postings subject "Simple Buy on Close, Sell on Open not as
expected". The last one, the one with the solution, was #14659, Feb 1,
2010 11:39am, by brucer.
Depending on your settings, you may not need BoilerPlate.afl. But I
strongly recommend you download it and use it often in your code (you
may modify it to match your own preferences. You can get it for free
from AmibrokerU.com. To down load requires registration (free).
-- Keith
On 4/5/2010 07:07, trade_two_live wrote:
Hello Antonio,
thanks, but the sell / buy signal exclude each other
Buy = RSI(2) < 50;
Sell = RSI(2) > 50;
Or did i get something wrong here?
Frank
--- In [email protected] <mailto:amibroker%40yahoogroups.com>,
"Antonio Jordao Jr" <ajor...@...> wrote:
>
> I think you are buying on NEXT BAR opening and selling on ACTUAL BAR
closing, because you gave a delay of 1 to BUY and a delay of 0 to
SELL. That means you are selling before you buy.
>
> Regards
>
> Antonio
>
>
>
> From: Peter Pan
> Sent: Monday, April 05, 2010 7:43 AM
> To: [email protected] <mailto:amibroker%40yahoogroups.com>
> Subject: [amibroker] Something wrong: Sharpe Ratio > 10
>
>
>
>
> Hello AmiBroker Community,
>
> i'm testing the behavior of buying of at the OPEN and closing at the
CLOSE using SetTradeDelays (1,0,0,0);
> For the test i used PremiumData with Russel1000.
>
>
> SetBacktestMode( backtestRegular);
> SetTradeDelays( 1, 0, 0, 0 );
>
> BuyPrice = Open;
> SellPrice = Close;
> PositionScore = 100 - RSI(2);
> Buy = RSI(2) < 50 and ROC(Close,200) > 0;
> Sell = RSI(2) > 50;
>
>
> This little system gives me an excellent Sharpe Ratio (~10) , 89%
Winners, etc.
> I know something is wrong. How could i have built in lookahead bias?
The AB Code Check returned an ok: no future quotes are referenced
>
> Thanks for your help.
> Frank
>