Here is my thought on how to calculate the position size in terms of % of equity for futures, hopefully I am correct
TradeRisk = PointValue * TickSize * IIf( Buy, ValueWhen( Buy, BuyPrice - StopPrice ), IIf( Short, ValueWhen( Short, StopPrice - ShortPrice ), 0 ) ); // Stop loss $ EquityRisk = 2; // 2% of current backtest open equity PositionSize = - EquityRisk * MarginDeposit / TradeRisk; // result is percent of equity Example for long trade MarginDeposit = 500; PointValue = 1000; TickSize = 0.01; BuyPrice = 100; StopPrice = 95; EquityRisk = 2; TradeRisk = (1000*0.01)* (100-95) = 50; PositionSize = -2 * 500 / 50 = 20 % Of Equity for trade -- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 09/05/07, Kevin Glenn <[EMAIL PROTECTED]> wrote:
Can I add on to this question please? If you are for backtesting in futures mode with the following parameters using NQ as an example; Margin = 3750 Tick size = .25 Points = x20 Equity = 100,000 Position Risk = 1% of equity/$1000 Points between buy and stop = 10 pts/$200 per contract at risk Thus, you want the backtester to buy/short 5 contracts ------------------------------
