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 Option Whisperer, Today, 09:55 AM
          1 response
          11 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          1 view
          0 likes
          Last Post port119
          by port119
           
          Started by Philippe56140, Today, 02:35 PM
          0 responses
          3 views
          0 likes
          Last Post Philippe56140  
          Started by 00nevest, Today, 02:27 PM
          0 responses
          2 views
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Working...
          X