Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

External Data Feed to drive Ninja Chart

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

    External Data Feed to drive Ninja Chart

    Can the External Data Feed be used to drive a Ninja Chart? I am pushing bid, ask, last playback to Ninja and have notice that tick bars will print but second bars will not. Any thoughts?

    Thanks,

    Whitmark
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    #2
    >> Can the External Data Feed be used to drive a Ninja Chart?
    Absolutely

    Do minute bars work? Then second bars should work as well.

    Comment


      #3
      Dierk,

      Finally had time to followup this one up. Although I routinely push ticks from NeoTicker to Ninja to drive the DOMs, I hadn't tried to drive charts until recently. In the attached exhibit you will find examples where it appears the DOM is working propertly but the charts 1) don't break the time bars appropriately and 2) don't update the time axis correctly for tick and time bars. I thought it might be the datetime stamp I was passing, so I outputed the values and they look fine.

      Listed below are the function declarations that I have always used from within a Neo indicator using Delphi.

      Function LastPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
      Function AskPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
      Function BidPlayback( Symbol: string; Price: Double; Size: Integer; Timestamp: string ): integer; stdcall; external 'NtDirect.dll';
      Any thoughts as to why the Ninja charts don't seem to pick up on the datetime stamp?

      Thanks,

      Whitmark
      Attached Files
      whitmark
      NinjaTrader Ecosystem Vendor - Whitmark Development

      Comment


        #4
        Unfortunately I can't read the important details of your screenshot. I would not know what causes that issue. The only advise I could give you is strictly following the documented timestamp formatting "yyyyMMddhhmmss" and making sure there are no leading or trailing spaces.

        Comment


          #5
          Here is another idea: if you are submitting timestamps smaller than the last bar on chart, then of course all data is added to this last bar.

          Comment


            #6
            Hi Dierk,

            Thanks for your thoughts. I've verified that the datetimestamp format is correct with no leading or trailing spaces. Given the options I have to format a chart:

            > Days back
            > Bars back
            > Start and Last date

            Its not clear to me how I could playback historical data if under the "Days back" and "Bars back" settings, as it would seem that the last bar is set to the current datetime and as you say, I would be submitting smaller (earlier) timestamps than the one on the last bar.

            Alternatively, I could use the "Start and Last date" option. But setting the Last date to a timestamp to the day before or the day after my historical data or does not seem to work either.

            Keep in mind, that under all of these scenarios, the DOM correctly shows the bid, ask, and last price/size changing tick-by-tick and correctly applies the proper historical datetime stamps to orders and executions.

            Is there a way to configure the chart to allow a historical external data feed to populate a chart correctly and with the proper data backfill from Ninja? Could it be that the ATI playback functions really only supports realtime data push for charts and not historical data push as their function names would suggest? Does this work with the eSignal data replay?

            Thanks for your help on this.

            Regards,

            Whitmark
            whitmark
            NinjaTrader Ecosystem Vendor - Whitmark Development

            Comment


              #7
              >> But setting the Last date to a timestamp to the day before or the day after my historical data or does not seem to work either.
              Why? Then you've got no chart data for the replay date - which is fine - and replay should work as expected, provided the timestamps are formatted correctly.

              Comment


                #8
                Hi whitmark,

                It should work. I've been using it on my end here for a while now. What you need to do is set back your system clock to the date before the replay date. I know thats a hassle right now, but it seems to be the only workaround. What's nice is you can actually increase your replay speed from the Neoticker Sim Server and I believe you won't face the race conditions you would normally face when using NinjaTrader's normal replay feature. The caveat to this method is it gets quite CPU intensive if you try to drive NinjaTrader at 500x. Especially the DOM, it takes awhile to catch up, but at least it works and any NinjaScript strategy you are testing enters and fills as it would if you were just running at 1x speed (or at least thats what I have been able to discern so far).



                Last edited by NinjaTrader_JoshP; 10-20-2007, 01:24 PM.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Bravo Josh! Thank you. I vaguely recall reading the system clock resetting requirement now that you mention it. It's interesting to note that it really isn't an issue for the DOMs but it is for the Charts. You're right, it is a hassle and I would add with limitations that run contrary to the spirit of the playback functions. Given the nature of the ATI, I can't see how this is an issue specific to NeoTicker and suspect it will not work for eSignal replay or any other historical replay without resetting the clock.

                  Ray/Dierk . . . what say you regarding an enhancement to allow historical playback without the need to reset the sytem clock. Thanks for your consideration.

                  Regards,

                  Whitmark
                  whitmark
                  NinjaTrader Ecosystem Vendor - Whitmark Development

                  Comment


                    #10
                    Thanks for your suggestion. We'll look into.

                    Comment


                      #11
                      Has there been any new developments or workarounds identified in versions 6.0 or 6.5 to allow Ninja Charts to be driven with a historical external datafeed without the need to reset the system clock as advocated by Josh.

                      Thanks,

                      Whitmark
                      whitmark
                      NinjaTrader Ecosystem Vendor - Whitmark Development

                      Comment


                        #12
                        I don't recall at this time. I suggest retrying based on latest NT 6.5 beta or browsing the release notes.

                        Comment


                          #13
                          Hello,

                          In response to the last post I can confirm that timestamps in charts under NT6.5 still appears to be broken.

                          Specifically - I can send ticks to NT and they are picked up fine in a chart. The timestamps however are not. This in itself would not mean the end of the world were it not for the fact that each time you run the same time series through the chart you also get a slightly different output owing to the chart parsing the data into bars in an inconsistent fashion. This then means that you cannot run the same indicator on the same time series and get the same result.

                          I know you guys probably have a list of bugs to fix/changes to make longer than all our arms put together but this one has been there for a while now. I suppose you are judging this by the fact that only one other person has commented on it and therefore it's not urgent. There's nothing much I can say to that - other than to repeat it is not currently possible to consistently test one's custom indicator (derived from highs, lows, opens and closes) without fixing this issue.

                          Is there any feedback you can give on this?

                          many thanks in advance

                          P.S. there is, however, no need to reset the system clock. Mine accepts data just fine with the clock as is.

                          Comment


                            #14
                            I am experimenting with a tick server that drives Ninja beautifully. I am having it coded and it is still a work in progress but there are no issues with the timestamps at all. The bars build the same way with every pass through the data and the time stamps on the charts are correct.
                            I feed Ninja ticks and it builds tick or minute charts just fine. I do have to delete any historical data for the symbol from Ninja first of course for this to work. This is no big deal especially if you make up unique instrument names for back testing use only.

                            Anyway the real problem I am having is with "race conditions" that I guess are similar to this...

                            Originally posted by NinjaTrader_Josh View Post
                            Hi whitmark,

                            It should work. I've been using it on my end here for a while now. What you need to do is set back your system clock to the date before the replay date. I know thats a hassle right now, but it seems to be the only workaround. What's nice is you can actually increase your replay speed from the Neoticker Sim Server and I believe you won't face the race conditions you would normally face when using NinjaTrader's normal replay feature. The caveat to this method is it gets quite CPU intensive if you try to drive NinjaTrader at 500x. Especially the DOM, it takes awhile to catch up, but at least it works and any NinjaScript strategy you are testing enters and fills as it would if you were just running at 1x speed (or at least thats what I have been able to discern so far).
                            With the experimental server I can drive Ninja at 1000x. This surprisingly works great for drawing charts but it destroys the internal Ninja order server simulator. The entries and exits are made but they can have huge "slippage on steroids". When Ninja finally does catch up and post the trades on the chart I see that I got entries that are no where near reality with partial fills spanning 20 to 30 pip ranges.
                            I need to run at 1000x since I am looking at years of data and 12 to 24 hour charts. Is there any hope for changes in the order simulator in the 7 beta?
                            For now I am using StreamWriters in my scripts to do my own order and performance logging but if the Ninja Sim account could keep up that would certainly be much more elegant.

                            I am wondering what do users like Whitmark do to work around this issue. Simply run replays slower? That's no fun!

                            Thanks,
                            Gains

                            Comment


                              #15
                              Gains,

                              I am curious, how big is your NinjaTrader.mdb file? Mine seems to peak out at about 2,095,000 kb (approximately 800 million lines of tick data before NT refuses to add any more data).

                              Thanks!
                              TJ

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Irukandji, Today, 04:58 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post Irukandji  
                              Started by fitspressoburnfat, Today, 04:25 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post fitspressoburnfat  
                              Started by Skifree, Today, 03:41 AM
                              1 response
                              4 views
                              0 likes
                              Last Post Skifree
                              by Skifree
                               
                              Started by usazencort, Today, 01:16 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post usazencort  
                              Started by kaywai, 09-01-2023, 08:44 PM
                              5 responses
                              604 views
                              0 likes
                              Last Post NinjaTrader_Jason  
                              Working...
                              X