Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

anomalous behavior of the strategy according to the market.

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

    anomalous behavior of the strategy according to the market.

    I have built a strategy that uses the prices of the level 2.
    Strategy works very well if applied FESX to the futures 06-10, while applying her/it to the futures FDAX 06-10 is not activated and the writing appears:
    "
    **NT** Enabling NinjaScript strategy 'BrunoBooks021/f60b7789c4fb48ee86e474edcff4bdb5' : On starting a real-time strategy - StrategySync=WaitUntilFlat SyncAccountPosition=False EntryHandling=UniqueEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True MaxRestarts=4 in 5 minutes
    **NT** Error on calling 'OnMarketDepth' method for strategy 'BrunoBooks021/f60b7789c4fb48ee86e474edcff4bdb5': You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."

    For which motive it happens this? Thanks.

    #2
    Hi onurbbruno,

    There have been some changes to how OnMarketDepth() is used in NinjaTrader 7, please review the following - http://www.ninjatrader.com/support/f...ead.php?t=3478

    And please provide the code snippet of how OnMarketDepth() is being used.
    TimNinjaTrader Customer Service

    Comment


      #3
      I have tried the code SampleMarketDepth. But it doesn't work. What I don't understand is how come the same strategy with the method OnMarketDepth works with a market (FESX) and not with the FDAX.

      Comment


        #4
        Hi onurbbruno,

        Try running the NT7 version of the sample mentioned earlier. For this test, ensure you don't have a SuperDOM running while you do this.

        As for your error...
        Please provide the code snippet of how OnMarketDepth() is being used.
        TimNinjaTrader Customer Service

        Comment


          #5
          Hi
          I send my strategy that up to yesterday it worked on FDAX and FESX and it works only today on FESX. Try her and it eventually sends suggestions.
          Attached Files

          Comment


            #6
            onurbbruno,

            I suggest bracketing all of the various segments of your OnMarketDepth() with try-catch blocks to see where it runs into the error. Then you will be able to decipher what is happening from there.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Frank1000, Today, 03:05 AM
            0 responses
            3 views
            0 likes
            Last Post Frank1000  
            Started by ntdev, Today, 01:14 AM
            4 responses
            15 views
            0 likes
            Last Post ntdev
            by ntdev
             
            Started by ct, Today, 02:22 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by yodaler, Yesterday, 06:12 PM
            4 responses
            13 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by sinpeople, 05-07-2021, 04:38 AM
            2 responses
            21 views
            0 likes
            Last Post hedgeplay  
            Working...
            X