PDA

View Full Version : Trade based off of Sim account size


shazzmoe
08-04-2010, 09:24 AM
I want to test how a system I have written will perform when I position size based on current account size. Is this possible?

Exaple: Start with $25000. Each trade will risk 5% of the total current account (so it trades heavier as it increases and lighter as it decreases)

My system already has a variable which takes in dollar amount to risk so I can manually trade this but ideally I would like it to look at the account size and find a percentage so I can backtest my method.

NinjaTrader_Austin
08-04-2010, 09:37 AM
shazzmoe, it is possible with NinjaTrader 7 to access your account size while running a strategy live (not necessarily with real money) by using the GetAccountValue() (http://www.ninjatrader.com/support/helpGuides/nt7/index.html?getaccountvalue.htm) method.

Another option would be to create a variable that you input the starting account balance into, and then when each trade closes, you can update that value to run your position sizing calculations.

This sample (http://www.ninjatrader.com/support/forum/showthread.php?t=4084) goes over how to use performance data in your strategy.

shazzmoe
08-04-2010, 04:58 PM
Thank you very much this has been a great help for me trying to properly position size

NinjaTrader_Austin
08-04-2010, 04:59 PM
shazzmoe, you are very welcome. Enjoy the rest of your evening!