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

[amibroker] Response to streaming RT Data



PureBytes Links

Trading Reference Links




 


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.







Title: nikkeiOpt - Backtest Report


Statistics | Charts | Trades | Formula | Settings | Symbols

Settings

 
Initial Equity:10000Periodicity/Positions:Daily/Long Short
Commissions:0.50 %Annual interest rate:0.00%
Range:All quotationsApply to:Current SymbolMargin requirement:100Futures mode:No
Def. round lot size:0Def. Tick Size0
Drawdowns based on:Open prices  
Long trades
Buy price:OpenSell price:Open
Buy delay:1Sell delay:1
Short trades
Short price:OpenCover price:Open
Short delay:1Cover delay:1
Stops
Maximum loss:disabledProfit target:disabled
Value:30.00Value:20.00
Exit at stop?yesExit at stop?no
 Trailing stop:disabled  
Value:5.00  
Exit at stop?no  
Attachment:
profdist.png
Description: PNG image
Title: nikkeiOpt - Backtest Report


Statistics | Charts | Trades | Formula | Settings | Symbols

Formula
// Nikkei 2003 timing  
SYM="^N225";  
STARTBUY=DateNum()==1030131;  
STARTSELL=DateNum()==1030217;  
startIP=DateNum()==1030530;in=DateNum()>=1030530;  
x=17;  
EVENT=BarsSince(startIP)%x==0;  
Plot(50,"",1,1);  
shape=33+2*(Cum(event)%10);  
Color=colorIndigo;space=-40;  
PlotShapes(shape*EVENT,color,0,Graph0,space);  
  
//2nd  
event1=Cum(event)%10==0 AND Ref(Cum(event)%10,-1)!=0;  
Counter1=Cum(event1);  
shape1 = IIf(counter1==0,shapeNone,shapeDigit0 + 2 * ( Counter1%10 )) ;  
PlotShapes(event*shape1,color,0,Graph0,space+10);  
Plot(0,"",1,1);  
G=0;  
for(BuyFREQ=20;BuyFREQ<40;BuyFREQ++)  
{  
for(SellFREQ=25;SellFREQ<60;SellFREQ++)  
{  
Buy=BarsSince(STARTBuy)%Buyfreq ==0;  
Sell=BarsSince(STARTSell)%Sellfreq==0;  
Short=Sell;Cover=Buy;  
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);  
e1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);  
}}  
BFpass=0;SFpass=0;  
for(BuyFREQ=20;BuyFREQ<40;BuyFREQ++)  
{  
for(SellFREQ=25;SellFREQ<60;SellFREQ++)  
{  
Buy=BarsSince(STARTBuy)%Buyfreq ==0;  
Sell=BarsSince(STARTSell)%Sellfreq==0;  
Short=Sell;Cover=Buy;  
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);  
e1=Equity(1,0);  
E11=ValueWhen(EVENT,E1);  
BF1=IIf(E11==G,BuyFREQ,0);BFpass=BFpass+BF1;  
SF1=IIf(E11==G,SellFREQ,0);SFpass=SFpass+SF1;  
G=IIf(E11==G,0,G);  
}}  
Plot(BFPASS,"\nBFpass",colorBlack,8);Plot(SFPASS,"SFpass",colorBlue,8);  
// the trading system  
Cb=in*BarsSince(STARTBuy)%BFpass ==0;  
Cs=in*BarsSince(STARTSell)%SFpass==0;  
Cb=ExRem(Cb,Cs);Cs=ExRem(Cs,Cb);  
Buy=in*BarsSince(STARTBuy)%BFpass ==0;  
Sell=in*BarsSince(STARTSell)%SFpass==0;  
Short=Sell;Cover=Buy;  

Attachment: Description: "Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);"