Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with indicator & strategy in RealTime

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

    #31
    EMA integrates DataSeries objects which is unnecessary at this point in time. The root issue you want to discover is if your system is actually processing different bars and to do that is easily seen if you print CurrentBar from the indicator and the strategy along with timestamps for each.

    This is the base scenario that must be confirmed to work first. If you are looking at different bars there is no reason to even proceed into anything with data manipulation.
    Josh P.NinjaTrader Customer Service

    Comment


      #32
      cool, thanks for the explanation. I'll print that info out tomorrow morning.

      thanks

      Comment


        #33
        Hey -- after modifying my strategy and indicator and printing currentbar, it doesn't really give any useful info.


        Can i assume you mean that this is useful only if I am calling the indicator FROM my strategy? Because right now i am running them individually (e.g. the indicator is running on a chart)

        thanks

        Comment


          #34
          You need to run them from the strategy for an apples to apples comparison.

          The only other comparison that would work is just to do something like an SMA indicator on the chart and print SMA values from strategy. You will see they match timestamps with SMA values perfectly.
          Josh P.NinjaTrader Customer Service

          Comment


            #35
            If i were to use the SMA for the example, it would not be applied against my dataset, and frankly i think the dataset is part of the problem.

            I am just going to switch everything over this weekend to call the indicator from my strategy and see if that fixes it. I have a feeling that will work-around this issue for some reason.

            I will reply with the results.

            Comment


              #36
              I just went and re-read the beginning of this thread now that I understand my problem a little bit better. Looks to me like it is identical to what the original author reported, which was acknowledged as some sort of platform bug.

              I will follow the original recommendation and move this stuff into an indicator which I call from the strategy. Will reply if that fixes it.

              Comment


                #37
                I modified my strategy to remove the ERG calculation logic and instead I am now calling an indicator containing that logic to get the values. After making this change, the values appear to be calculated correctly both in real time and historical processing.

                I will 100% confirm this tomorrow but I am more or less positive it is now working.

                I think it's pretty conclusive that there is some problem with dataseries oriented calculations in strategies when transitioning from historical to real time data. I don't know if this is limited to certain indicators (such as EMA) or if it is a broad based problem affecting all indicators. All I know is the exact same logic fails to calculate properly in a strategy but then works properly once placed into an indicator. The original author of this thread also clearly experienced the same issue

                In any case, I am happy to have a working solution/work-around and will consider this issue closed from a support perspective.

                Thanks,
                Brandon

                Comment


                  #38
                  This is confirmed to work 100%. I can't tell you how nice it is to see live results that actually match backtest results and do what they are supposed to do. I realize now that this wackiness has been killing several variants of this strategy for months.

                  br

                  Comment


                    #39
                    Glad you got a workaround that has satisfied your needs.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    648 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    369 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    108 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    572 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    574 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X