Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer query- order quantity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy Analyzer query- order quantity

    Hi

    Is there a way with the strategy analyser to backtest a strategy, and set a % of my capital I'd like to risk on every trade, so the backtest results show the $ amount I would make or lose?

    e.g. To input that I have a starting capital amount of $100,000, and I'd like to risk 1% ($1,000) on every trade, across the portfolio that I'm backtesting.

    If my capital went down after a loss to, say, $99,000 I'd like the analyser to still trade 1% of my pot, but this time, it would only be committing $990 on the next trade. If this lost, I'd like the analyser to trade $980. So on, and so forth...

    I'm new to NT and seem to be struggling to program this part in, although it is probably really simple!

    Many thanks
    Steve

    #2
    Hello Steve,

    I put together a sample to demonstrate this.

    The strategy enters trades and uses a 7 tick Stop Loss, with order quantity being dynamic.

    You should set the bool isBacktest to true if you'd like to input your starting account size, and test the strategy historically, otherwise if its set to false the strategy will only run in real time and your account size will be pulled from NT Sim 101 account.

    The strategy will adjust the trade size based on account size value.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by FelipeRXP, Today, 08:40 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by petedian, Today, 08:44 AM
    0 responses
    12 views
    0 likes
    Last Post petedian  
    Started by J0shTrader, Yesterday, 12:29 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by bc24fl, Today, 08:07 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by LadGta2018, Today, 08:26 AM
    2 responses
    6 views
    0 likes
    Last Post NinjaTrader_Tyler  
    Working...
    X