Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not getting live bars..

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

  • heech
    replied
    Originally posted by NinjaTrader_Josh View Post
    I just tried with ES 06-09 on my end and not seeing what you are seeing. Primary = 1min
    Aha. ES 06-09 works for me as well, but NG 07-09 as a secondary instrument STILL does not. Please confirm on your side.

    protected override void Initialize()
    {
    CalculateOnBarClose = true;
    Add("ES 06-09", PeriodType.Minute, 1);
    Add("NG 07-09", PeriodType.Minute, 1);
    }

    instrument: ES 06-09, time: 6/5/2009 8:32:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:32:00 AM(historical)
    instrument: ES 06-09, time: 6/5/2009 8:33:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:33:00 AM(historical)
    instrument: ES 06-09, time: 6/5/2009 8:34:00 AM

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    I just tried with ES 06-09 on my end and not seeing what you are seeing. Primary = 1min

    6/5/2009 9:24:00 AM BIP: 0 Historical: True
    6/5/2009 9:24:00 AM BIP: 1 Historical: True
    6/5/2009 9:25:00 AM BIP: 0 Historical: False
    6/5/2009 9:26:00 AM BIP: 0 Historical: False
    6/5/2009 9:27:00 AM BIP: 0 Historical: False
    6/5/2009 9:27:00 AM BIP: 1 Historical: False
    6/5/2009 9:28:00 AM BIP: 0 Historical: False

    Code:
    protected override void Initialize()
    {
        CalculateOnBarClose = true;
        Add("ES 06-09", PeriodType.Minute, 3);
    }
    
    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
        Print(Time[0] + " BIP: " + BarsInProgress + " Historical: " + Historical);
    }

    Leave a comment:


  • heech
    replied
    Originally posted by NinjaTrader_Josh View Post
    Please also try NG 5min primary and use Add(PeriodType.Minute, 1).
    This *is* working. I'm getting both 5m and 1m bars live and historical.

    EDIT: But I really do need the other version of Add() working as well. I've been able to use it in the past (with Add("VX 06-09"...)). Why would there be a problem with the NG version?
    Last edited by heech; 06-05-2009, 09:24 AM.

    Leave a comment:


  • heech
    replied
    Yea... I've flipped it around, and I can confirm that the primary bar is working great both historical AND live, while secondary bars only load in historical but not live.

    Here's the results after being flipped:

    instrument: NG 07-09, time: 6/5/2009 8:00:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:00:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:01:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:02:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:03:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:04:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:05:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:05:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:06:00 AM(historical)
    instrument: NG 07-09, time: 6/5/2009 8:07:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:08:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:09:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:10:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:11:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:12:00 AM
    instrument: NG 07-09, time: 6/5/2009 8:13:00 AM

    You can see the doubled outputs at 5m intervals historical, but only 1m output while live.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    How are you evaluating that you are not receiving the secondary bars? You receive multiple 5 mins with no 1 min updates on the same instrument?

    Please also try NG 5min primary and use Add(PeriodType.Minute, 1).

    Leave a comment:


  • heech
    replied
    Originally posted by NinjaTrader_Josh View Post
    Remove the extra bars and try again. Please also try with just one connection. You should connect to the data provider you want to receive data from for that instrument class first.
    I'm connected to just Mirus now.

    - I had been running with ES 06-09 as my primary, and adding NG 1/5 minute bar (as in previous code).

    - If I now run on NG 1 minute as primary (and adding nothing), I AM getting live bars!

    - If I run on NG 5 minute as primary (and add NG 1 minute), I'm getting a LIVE 5 minute bar, but am NOT getting live 1 minute bars!!

    Is there something wrong with the way I'm using add? This code is veeeeeeeery proven with equities. I've changed nothing except the symbol, when coming to the future side.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Remove the extra bars and try again. Please also try with just one connection. You should connect to the data provider you want to receive data from for that instrument class first.

    Leave a comment:


  • heech
    replied
    Originally posted by NinjaTrader_Josh View Post
    Well for one, is live data actually coming in?
    I assume you posted this before my second post. As I said, live chart is showing up great.

    I've just setup this dummy strategy... and it's got the same behavior. I get prints on historical bars, but no more once the strategy starts running.

    /// <summary>
    /// This method is used to configure the strategy and is called once before any strategy method is called.
    /// </summary>
    protected override void Initialize()
    {
    CalculateOnBarClose = true;
    Add("NG 07-09", PeriodType.Minute, 1);
    Add("NG 07-09", PeriodType.Minute, 5);
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    Print("instrument: " + Instrument.FullName + ", time: " + Time[0]);
    }

    It must be the way I have account connections setup on here... that's the only explanation. But I don't know how. I've tried this dummy strategy with Sim101 (using IQFeed) and my Mirus live account.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Please switch over to a very basic indicator/strategy that only prints timestamps with no other logic. Does it work then?

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Well for one, is live data actually coming in?

    Leave a comment:


  • heech
    replied
    Just a few more data points:

    - if I open up a chart, I see bars coming in and filling.
    - if I run my strategy (from the strategies' tab)... just not getting any new bars in my code.

    Leave a comment:


  • heech
    started a topic Not getting live bars..

    Not getting live bars..

    Hi,

    I'm trying something new... trading futures for the first time with my strategy.

    I've set everything up exactly the way I usually do (for US equities). I'm using symbol NG 07-09. I add two bars: 5 minutes and 30 minutes in my init code.

    I have two datafeeds: IQFeed (with NYMEX enabled), and also ZenFire. When I run everything historically, everything looks perfect. I have added a simple print out in my OnBarUpdate(), and I can confirm I get every bar.

    But *after* I start my strategy... nothing. I'm just not getting any bars. The print at the top of OnBarUpdate() just is'nt getting hit.

    I must be missing something obvious... but I don't know what. Any suggestions?

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 03-31-2026, 09:41 PM
1 response
153 views
1 like
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 04-01-2026, 02:41 AM
0 responses
89 views
1 like
Last Post CarlTrading  
Started by CaptainJack, 03-31-2026, 11:44 PM
0 responses
133 views
2 likes
Last Post CaptainJack  
Started by CarlTrading, 03-30-2026, 11:51 AM
0 responses
129 views
1 like
Last Post CarlTrading  
Started by CarlTrading, 03-30-2026, 11:48 AM
0 responses
107 views
0 likes
Last Post CarlTrading  
Working...
X