Trade options and backtesting

lvgandhi

Well-Known Member
#1
I have following trade options
_SECTION_BEGIN( "Trade options" );
//SetOption("",);

Param_LotSize = Param("Lot Size", 25,5,5000,5);
Param_NoOfLots = Param("No of lots normally traded",1,1,20,1);
Param_Equity = Param("Amount of Equity",120000,10000,2000000,1);
Param_Margin = Param("Margin",11,10,100,1);

RoundLotSize = Param_LotSize;
SetOption("FuturesMode",True);
SetOption("MinShares",Param_NoOfLots);
SetOption("InitialEquity",Param_Equity);
SetOption("AccountMargin",Param_Margin);
_SECTION_END();

As per this, position value can be (120000*100/11) ie 1090909. But back tests did not utilize this much amount for trading.
This can be seen from the following results exported.

Ticker,Trade,Date,Price,Ex. date,Ex. Price,% chg,Profit,% Profit,Contracts,Position value,Cum. Profit,# bars,Profit/bar,MAE,MFE,Scale In/Out,
BANKNIFTY-I-NSE,Short,27/01/2010,8601,17/02/2010,8488.19,-1.31%,5640.60,1.31%,50,430050.00,5640.60,16,352.54,-1.26%,5.35%,0/0
BANKNIFTY-I-NSE,Long,03/03/2010,8953.38,13/04/2010,9495.12,6.05%,27087.00,6.05%,50,447668.75,32727.60,28,967.39,-0.20%,9.31%,0/0
BANKNIFTY-I-NSE,Long,22/04/2010,9581.74,05/05/2010,9587.45,0.06%,428.03,0.06%,75,718630.37,33155.63,10,42.80,-0.85%,3.26%,0/0
BANKNIFTY-I-NSE,Long,12/05/2010,9733.86,14/05/2010,9656.11,-0.80%,-5831.47,-0.80%,75,730039.82,27324.15,3,-1943.82,-1.58%,1.08%,0/0
BANKNIFTY-I-NSE,Short,21/05/2010,9000,27/05/2010,9195.53,2.17%,-14664.60,-2.17%,75,675000.00,12659.55,5,-2932.92,-3.22%,2.06%,0/0
BANKNIFTY-I-NSE,Long,17/06/2010,9592.59,25/06/2010,9541.72,-0.53%,-2543.65,-0.53%,50,479629.69,10115.90,7,-363.38,-1.69%,1.95%,0/0
BANKNIFTY-I-NSE,Long,12/07/2010,9788.89,27/08/2010,10774.4,10.07%,49276.40,10.07%,50,489444.58,59392.30,35,1407.90,-0.74%,13.51%,0/0
BANKNIFTY-I-NSE,Long,03/09/2010,10994.4,14/10/2010,12601.1,14.61%,120500.25,14.61%,75,824579.59,179892.55,29,4155.18,-0.68%,16.88%,0/0
BANKNIFTY-I-NSE,Long,04/11/2010,13020,11/11/2010,12870.8,-1.15%,-14922.00,-1.15%,100,1302000.00,164970.55,6,-2487.00,-1.15%,2.30%,0/0

I understand that once values are set for options in AFL, it over rides that in settings in dialog box. Is my understanding correct?
What else can affect this position value and how it can be set in AFL to avoid them being used from settings dialog.