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

[amibroker] Erronous Trade in new system generates unusual results



PureBytes Links

Trading Reference Links

Hi, 

I have a problem with the backtesting or the tickers
in  my database. Testing a system, I get a trade
showing a profit of 7,700% on AMMC in one day. Is this
sort of error common? I cant seem to get an answer
about it. 

Note- This system is from Elitetrader.com, out of a
discussion had by some traders about 2yrs ago. I have
yet to seriously play around it. But I would like
feedback as I've had these kinds of erronous trades
happen when I test public systems available on the
Amibroker site or elsewhere.

Eric

//System Code, run long only 

/* we use yesterday values to enter positions today
(hence Ref() ) */
Factor1 = Ref( High-Low, -1 );
Factor2 = Ref( ((High + Low + Close)/3), -1 );
Factor3 = Ref( EMA(Factor1, Optimize("EMA-period1",
30, 20, 40, 1 ) ), -1 );
Factor4 = Ref( EMA(Factor2, Optimize("Ema-period2", 9,
5, 20, 1 ) ), -1 );

KUp=Factor4+Factor3;
KDown=Factor4-Factor3;

/* entry conditions by price limit */
BuyPrice = KDown*0.84;
Buy = Low <= BuyPrice;
ShortPrice = KUp*1.38;
Short = High >= ShortPrice;

/* use built-in precent profit target stop */
ApplyStop( 1, 1, Optimize("Profit target", 5, 3, 9, 1
), 1 );

/* exit conditions */
timeintrade = Optimize("Time in trade", 3, 3, 7, 1 );
Sell = Ref( ExRemSpan( Buy, timeintrade ),
-timeintrade ); 
//OR Close >= Factor4;

Cover = Close <= Factor4;

PositionSize=-7.5;

Plot(Close,"Price", 2, 64 );
Plot(KUp, "KUp", 2 );
Plot(KDown, "KDown", 3 );
Plot(Factor4, "Factor4", 33 );


		
__________________________________ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

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 other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

PNG image