PureBytes Links
Trading Reference Links
|
I wrote a simple trading system that buy the best stock and short the wrost stock of my watchlist simultaneously at 9.15 am but the positionscore function does not work properly !!!!!!!! (I use AmiBroker version 5.20)
SetBacktestMode( backtestRegularRaw ); SetOption( "InitialEquity",20000); SetOption( "SeparateLongShortRank",True); SetOption( "MaxOpenPositions",2); SetOption( "MaxOpenLong",1); SetOption( "MaxOpenShort",1); PositionSize=10000; ApplyStop(0,0,0,0); ApplyStop(1,0,0,0); ApplyStop(2,0,0,0); SetTradeDelays(0,0,0,0); TimeFrameSet(in5Minute); Timeopen=TimeNum()==090500 ; Timeclose=TimeNum()==172000 ; Cieri=ValueWhen(Timeclose,C,2); Ooggi=ValueWhen(Timeopen,O,1); yield=((Ooggi / Cieri)-1)*100; score= PositionScore = Yield ;
Buy=Timeopen AND score; Sell=Timeclose; Short=Timeopen AND score; Cover=Timeclose; BuyPrice=O; SellPrice=C; ShortPrice=O; CoverPrice=C;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Short=ExRem(Short,Cover); Cover=ExRem(Cover,Short); Plot(C,"",colorBlack,styleCandle); _N(Title = StrFormat("{{NAME}} - ANG Spread Ita System - {{INTERVAL}} {{DATE}} - Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Filter=Buy AND Short; AddColumn(yield,"yield",6.4);
you see in the image ... http://img44.imageshack.us/i/positionscore.png/ I've already this problem?
thanks for the reply
Angio
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|