Hi,
I am backtesting a couple of scripts which are having high values ranging between 30,000 to 33,000. With the system I am able to plot all the buy and short arrows but I am not able to see the same trades on the backtest report.
can anyone please guide me if I am missing anything in the code put below.
_SECTION_BEGIN("Backtest");
RoundLotSize = 100; // Define Round Lot Size of the Trading Instrument
SetPositionSize (100,spsShares); // Define Fixed Trading Size
SetOption( "InitialEquity", 500000 );
SetOption( "FuturesMode", True );
SetOption( "CommissionMode", 2 ); // Fixed Brokerage Commissions (Per Trade)
SetOption( "CommissionAmount", 100 ); // Rs 100/Leg Commisions
SetOption( "MarginRequirement", 10 ); //Define Margin Requirement
SetOption("AccountMargin", 10 ); //Define Account Margin
tn = TimeNum();
startTime = 92000; // start in HHMMSS format
endTime = 230000; // end in HHMMSS format
timeOK = tn >= startTime AND tn <= endTime;
fast=Param("FAST",9,3,300,1,0);
slow=Param("SLOW",15,3,300,1,0);
BuySignal=Cross(EMA(C,9),EMA(C,15));
SellSignal=Cross(EMA(C,15),EMA(C,9));
Buy = Ref(BuySignal,-1) AND timeOK ; // AND timeOK
Sell = (Ref(SellSignal,-2) AND timeOK) OR Cross( tn, endTime ) ;
Short = Ref(SellSignal,-1) AND timeOK; // AND timeOK
Cover = (Ref(BuySignal,-1) AND timeOK) OR Cross( tn, endTime );
_SECTION_END();