Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

testing if source = external data feed

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

    testing if source = external data feed

    Is there a way to know (.i.e, a variable to check) if the current data source is the external data feed (vs. the replay, or sim, or real-time choices)?

    BTW, does BarTimer work with external pre-recorded data feeds?

    #2
    This is not officially supported, but I suggest you scroll to the DisplayTime() function in the BarTimer indicator to get an idea of how to do it.

    I don't believe there should be any issue with BarTimer on an external data feed.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Josh View Post
      ...scroll to the DisplayTime() function in the BarTimer indicator to get an idea of how to do it.
      I don't believe there should be any issue with BarTimer on an external data feed.
      No go. Actually, when I first wrote PRV, I copied the DisplayTime() method from BarTimer and named it SessionActive(). I did not understand why it was needed for BarTimer but took the conservative line & used it as a check on PRV calculations.

      Then I got an email from some-one who uses external data who said this check is always false when connected to external data feed. That seems odd, that BarTimer would also not work (this person does not use BarTimer).

      I am also curious as to why you check the SessionActive method when plotting the PRV. The reason I ask is if connected to "External Data Feed" SessionActive is always false. I use the External Data Feed to do replay of data that is not recorded by Ninja Trader and I had comment out the check for session active.
      So now, the question becomes: Is there ANY reason to check for SessionActive ? Why is DisplayTime checked in BarTimer?

      If I should remove the check in PRV please let me know. It would simplify things.
      Attached Files

      Comment


        #4
        Unfortunately this is beyond the level of support we can provide. You can play around with it and see how it reacts differently.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        149 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,283 views
        0 likes
        Last Post Leafcutter  
        Working...
        X