Announcement

Collapse
No announcement yet.

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

      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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          156 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          90 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          140 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          130 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