Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyser & unmanaged orders

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

    Strategy Analyser & unmanaged orders

    Hello,

    is it possible to run the strategy analyzer using an approach with the submission of unmanaged limit and stoplimit orders?

    Using the strategy analyzer, are there any restrictions that has to be taken into account when developing a strategy?

    Kind regards
    Gerik

    #2
    Hello Gerik,

    Thanks for your post.

    Yes, it is possible to run both unmanaged and managed strategies in the Strategy Analyzer for backtesting and live.

    You may find an unmanaged example script and managed example script in the forum thread linked below.



    Something to take into consideration is that NinjaScripts with Atm Strategy Methods cannot be backtested.

    I am linking this forum thread which contains an example that uses the unmanaged approach to submit a pair of opposing orders using oco (One Cancels Other): https://ninjatrader.com/support/foru...elp#post770579

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Brandon,

      thank you for your answer.

      I tried to do a backtest. It seems that there is only a state == state.historical, but not a state == state.realtime. The unmanaged orders I submit only in the state == state.realtime.

      How can I distinguish between live trading realtime and "realtime in backtesting mode"?

      Kind regards
      Gerik

      Comment


        #4
        Hello Gerik,

        Thanks for your note.

        Only historical data is used when running a backtest on a strategy in the Strategy Analyzer.

        Please review the help guide document on the differences on real-time vs backtest (historical).
        http://ninjatrader.com/support/helpG...ime_vs_bac.htm

        You could determine if the state is historical making a condition that checks if State == State.Historical. To check if the state is realtime your condition would check if State == State.Realtime.

        See this help guide page for more information about the NinjaScript States: https://ninjatrader.com/support/help...tatechange.htm

        If your strategy only places trades when the state is realtime, you could consider testing your strategy using the Playback connection instead of backtesting in the Strategy Analyzer. Testing the strategy using the Playback connection would mimic the strategy running on live market data.

        See this help guide for information about using Playback: https://ninjatrader.com/support/help...8/playback.htm

        Let us know if we may assist further.

        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Hello Brandon,

          thank you for your message.

          When using the Strategy Analyzer or using playback, will there be an unlimited buying power without any "virtual" margin call?

          Kind regards
          Gerik
          Last edited by Gerik; 12-26-2021, 10:45 AM. Reason: Previous question already solved - new question

          Comment


            #6
            Hello Gerik,

            Thanks for your note.

            That is correct. There is no set buying power value when backtesting a strategy in the Strategy Analyzer.

            The Playback account does have a set buying power value of $100,000. This buying power value cannot be modified to a different value. To reset the buying power in the Playback account, simply disconnect from the Playback connection and reconnect. Upon reconnecting, the buying power will be reset to $100,000.

            Let us know if we may assist further.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            65 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            139 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            75 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X