Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No Market Data to drive Simulation

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

    No Market Data to drive Simulation

    I am getting this dreaded error on daily gold futures (GC ##-##) but it's happening on all symbols I pull up, futures or forex. The strategy apparently fails after placing a stop:

    BuyToCover 1 @1279.3

    This is a strategy I have run for years and I'm making subtle changes to it right now. Here's the trace log which I'm catching in the output window:

    Code:
    9/4/2014 6:25:00 PM Entered internal PlaceOrder() method at 9/4/2014 6:25:00 PM: BarsInProgress=1 Action=SellShort OrderType=Limit Quantity=1 LimitPrice=1261.2 StopPrice=0 SignalName='Short Position' FromEntrySignal=''
    
    Short entry order has been submitted: Order='NT-00000/Sim101' Name='Short Position' State=PendingSubmit Instrument='GC ##-##' Action=SellShort Limit price=1261.2 Stop price=0 Quantity=1 Strategy='Thor' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='0862a060d78e4e77a18e8ab16e0c511a' Gtd='12/1/2099 12:00:00 AM'
    
    Order has been filled - adding stop.
    
    9/4/2014 6:25:00 PM Entered internal PlaceOrder() method at 9/4/2014 6:25:00 PM: BarsInProgress=1 Action=BuyToCover OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=1279.3 SignalName='Stop loss' FromEntrySignal='Short Position'
    
    Execution: Execution='NT-00000' Instrument='GC ##-##' Account='Sim101' Name='Short Position' Exchange=Default Price=1261.2 Quantity=1 Market position=Short Commission=0 Order='NT-00000' Time='9/4/2014 6:26:00 PM'
    
    Short stop: 1279.3
    
    Stop order: Order='NT-00001/Sim101' Name='Stop loss' State=PendingSubmit Instrument='GC ##-##' Action=BuyToCover Limit price=0 Stop price=1279.3 Quantity=1 Strategy='Thor' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='445f25c92423420f94484477d3e6db01' Gtd='12/1/2099 12:00:00 AM'
    Stop order Action: BuyToCover
    Stop order Price: 1279.3
    Current Bid: 1261.2
    *Current Ask*: 1261.2
    So I'm not doing anything inverse or placing two stops at the same time. I tried two different simulation accounts and got the same error.

    Any help would be appreciated as I'm a bit stuck.

    Thanks!
    Last edited by molecool; 09-28-2014, 07:42 AM.

    #2
    Update

    I am stepping through my code and have now added log statements ahead of any assignments to my stopOrder instance. There are a bunch in my code but the ONLY one being touched is the one in my OnExecution() method right after my short order was accepted. This is exactly what should be happening. Given that and the fact I have been running this strategy for years I suspect this may not be my code's fault.
    1. The short order was accepted and filled.
    2. The stop order is being placed properly and quite a distance away (see previous trace log)
    3. The stopOrder instance is not NULL after it has supposedly been placed. That was my first theory and apparently is NOT the problem.
    4. I do get log output from the days following the entry, so it seems the strategy keeps running.


    I'm not sure how to proceed from here. This should not be happening - have not seen this behavior in six years of working with NinjaTrader. My only theory is that it could be related to being a daily series. BTW, my strategy takes entry on a 1-min secondary series (again, this has worked fine for years).

    FYI - I sent you guys my trace files as I submitted an error ticket. Also, I cleared my database and restarted NinjaTrader. Even restarted Windows. Still happening on all symbols.
    Last edited by molecool; 09-28-2014, 08:08 AM.

    Comment


      #3
      Originally posted by molecool View Post
      I am stepping through my code and have now added log statements ahead of any assignments to my stopOrder instance. There are a bunch in my code but the ONLY one being touched is the one in my OnExecution() method right after my short order was accepted. This is exactly what should be happening. Given that and the fact I have been running this strategy for years I suspect this may not be my code's fault.
      1. The short order was accepted and filled.
      2. The stop order is being placed properly and quite a distance away (see previous trace log)
      3. The stopOrder instance is not NULL after it has supposedly been placed. That was my first theory and apparently is NOT the problem.
      4. I do get log output from the days following the entry, so it seems the strategy keeps running.


      I'm not sure how to proceed from here. This should not be happening - have not seen this behavior in six years of working with NinjaTrader. My only theory is that it could be related to being a daily series. BTW, my strategy takes entry on a 1-min secondary series (again, this has worked fine for years).

      FYI - I sent you guys my trace files as I submitted an error ticket. Also, I cleared my database and restarted NinjaTrader. Even restarted Windows. Still happening on all symbols.
      I would surmise that you are connected to MBTrading. I cannot say whether the problem is the connector or something with the MBTrading servers.

      Try this. Make make a simple market order, and you will get a message box: "There is no market data to drive the simulation engine. ..." Then disconnect and connect to Market Replay or another data feed (I used CQG). You do not get the error.

      Sometime later, closer to market open, there is no problem with MBTrading either. So, it would seem that the issue lies somewhere in the processing chain to MBTrading. I cannot begin to say exactly what, as the connection shows green in the Control Center, even when this error pops up.

      I am just saying that recently I have seen that error multiple times, and so far it is always when the market is closed, and it is always only if I am connected to MBTrading. I have yet to see it when the market is open. I have seen it both on weekdays and weekends, but most often on weekends. Heck I just did (see attachment).

      Just my $0.02.
      Attached Files
      Last edited by koganam; 09-28-2014, 10:46 AM.

      Comment


        #4
        Originally posted by koganam View Post
        I would surmise that you are connected to MBTrading. I cannot say whether the problem is the connector or something with the MBTrading servers.

        Try this. Make make a simple market order, and you will get a message box: "There is no market data to drive the simulation engine. ..." Then disconnect and connect to Market Replay or another data feed (I used CQG). You do not get the error.

        Sometime later, closer to market open, there is no problem with MBTrading either. So, it would seem that the issue lies somewhere in the processing chain to MBTrading. I cannot begin to say exactly what, as the connection shows green in the Control Center, even when this error pops up.

        I am just saying that recently I have seen that error multiple times, and so far it is always when the market is closed, and it is always only if I am connected to MBTrading. I have yet to see it when the market is open. I have seen it both on weekdays and weekends, but most often on weekends. Heck I just did (see attachment).

        Just my $0.02.

        Hey buddy - thanks for getting back to me so quickly. No, I'm actually connected to Kinetick and it's really busting my chops. This started out of nowhere and I have no idea what's causing it. The log/trace statements do not make any sense - I get this weird message but the strategy continues from there. AND the stopOrder project is filled.

        Comment


          #5
          Hello molecool,

          Thank you for your post.

          This has been seen when the market is closed or the volume traded is very low at the time the simulation order is placed.

          Comment


            #6
            Originally posted by NinjaTrader_PatrickH View Post
            Hello molecool,

            Thank you for your post.

            This has been seen when the market is closed or the volume traded is very low at the time the simulation order is placed.
            Hi Patrick - it was driving me nuts and it happened on ALL symbols and irrespective of entry time. Finally I thought of using the IQFeed connector instead and that fixed it. Seems like you guys had a problem on the simulation server.

            Comment


              #7
              I got the same error today couple times when I use tradestation data feeding NT for simulation. It is working now suddenly. It is very wired.

              thanks,

              ccl3093

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ruudawakening, Today, 12:58 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by i019945nj, 12-14-2023, 06:41 AM
              4 responses
              63 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by thread, Yesterday, 11:58 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by stafe, Yesterday, 08:34 PM
              1 response
              16 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by jclose, Yesterday, 09:37 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X