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

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 TheTechnician86, Today, 05:47 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post TheTechnician86  
                    Started by Ryan333, Today, 05:25 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post Ryan333
                    by Ryan333
                     
                    Started by hsammons87, Today, 05:21 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post hsammons87  
                    Started by Gmonte, 10-01-2022, 08:28 AM
                    2 responses
                    190 views
                    0 likes
                    Last Post charlesthomas  
                    Started by ETFVoyageur, 05-18-2024, 12:45 AM
                    5 responses
                    32 views
                    0 likes
                    Last Post ETFVoyageur  
                    Working...
                    X