Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies not functioning on market open

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

    Strategies not functioning on market open

    For @GER30 and @XAUUSD fxcm feed with NT historical data ticked.

    Steps to replicate:

    • Close NT down out of market hours
    • Open NT and load strategy on chart
    • Enable strategy
    • When market opens, strategy is not functioning
    • Disable/enable strategy (or reload historical data on chart) when market is open, strategy starts functioning

    This is a snippet of the start of my code which is the only thing I can see that could be stalling the strategy logic:


    Code:
           protected override void OnBarUpdate()
           {
            Print(ToTime(Time[0])+"  strategyName: Running");
               
            if(CurrentBars[0] < 60)
                return;
            
            if(CurrentBars[1] < 4)
                return;
    
    
    
            strategy logic here
    
    
    
            }
    This strategy is loaded onto a chart with 20 days of 1min data and 20 days of D1 data. The print command doesn't print on market open when the bar updates begin. Is the code getting stuck on these if(CurrentBars)? If I reload the strategies or the chart data when the market is open, the strategies start operating and the print output works.

    #2
    ETH or RTH charts?

    Are the charts working at all at open?

    Your current bars check won't affect that Print statement.

    Comment


      #3
      Originally posted by sledge View Post
      ETH or RTH charts?

      Are the charts working at all at open?

      Your current bars check won't affect that Print statement.
      The charts are definitely working at open, realtime data is flowing.

      The charts are FXCM cfds, in the case of @ger30 the chart data displays 7am to 9pm London time.

      Comment


        #4
        Hello pmn100,

        Thank you for the post.

        Please send me your log and trace files to platformsupport[at]ninjatrader[dot]com so that I may look into what occurred.

        You can do this by going to the Control Center-> Help-> Mail to Platform Support.
        Please copy/paste the link to this forum post in the body of your email.

        I look forward to assisting further.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by elderan, Today, 08:03 PM
        0 responses
        2 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        9 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        169 views
        0 likes
        Last Post jeronymite  
        Working...
        X