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

if (State == State.Realtime); not filtering Historical

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

    if (State == State.Realtime); not filtering Historical

    if (State == State.Realtime); is not filtering out Historical Data

    see attached indicator

    setup:

    live data feed

    2 range bars


    the code is simple and could be self explanatory

    primary series [0]= 2 range
    second series [1] = t0 second

    the results are inconsistent

    sometimes when the indicator loads it starts displaying the barcount (CurrentBar) as expected

    but mot of the time, for both series it starts displaying bars that are in the Historical Range....

    I'm having this problem consistently amd there must be some simple explanation....

    I'm converting from Ninja 7 and always there the Historical boolean was reliable...so I must be missing something...

    ???
    Attached Files

    #2
    primary series.... Load One Day

    Comment


      #3
      Hello llanqui,

      You put a semi colon at the end of your if statement, that terminates the if statement.

      if (State == State.Realtime); <--- remove that
      JesseNinjaTrader Customer Service

      Comment


        #4
        well, thanks for being kind and not telling me I'm stupid.... :-)

        too many hours staring at code...

        I owe you a latte, or beer, your choice...

        Comment


          #5
          Just spent 6+ weeks, every day, coding the port from NT7 to NT8....finally almost finished...tired brain... :-)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Started by Fitspressorest, Today, 01:38 PM
          0 responses
          2 views
          0 likes
          Last Post Fitspressorest  
          Started by Jonker, Today, 01:19 PM
          0 responses
          2 views
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          8 views
          0 likes
          Last Post futtrader  
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,792 views
          0 likes
          Last Post aligator  
          Working...
          X