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

Using Indicators on Cumulative Order Flow Delta

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

    Using Indicators on Cumulative Order Flow Delta

    Will "IsSuspendedWhileInactive == true" cause problems with running an indicator on Cumulative Order Flow Delta data in live trading? I am having issues with a strategy on live data which does not occur in backtest. Note, I am running the backtest in tick replay since I have to for obvious reasons.

    #2
    Note, my problem is I am holding an int value in a series representing bar types as defined by the indicator which is running on the cumulative order flow delta data now provided by Ninjatrader. The int value is correctly assigned in backtest on tick replay but does not get assigned while running on live data.

    I am confident I started the strategy during session down time between 4 PM and 5 PM CST yesterday. I am trading COMEX futures.

    Comment


      #3
      Hello liquid50,
      Thanks for your post.

      Will "IsSuspendedWhileInactive == true" cause problems with running an indicator on Cumulative Order Flow Delta data in live trading?
      Is this a condition you have created, or do you just mean setting this property to "true" inside State.SetDefaults?

      I am having issues with a strategy on live data which does not occur in backtest.
      What are the results you are getting for each one? Also, who is your data provider?
      Josh G.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_JoshG View Post
        Hello liquid50,
        Thanks for your post.
        Thanks for yours!

        Originally posted by NinjaTrader_JoshG View Post
        Is this a condition you have created, or do you just mean setting this property to "true" inside State.SetDefaults?
        The latter. It is in the code for the moving average/chop filter indicator running on CumOFDelta.

        Originally posted by NinjaTrader_JoshG View Post
        What are the results you are getting for each one? Also, who is your data provider?
        There are three potential INT values corresponding to a variable bartype. There is bull trend, bear trend, and chop. 1, 2, and 3 respectively. In backtest the values print as expected. On live data, the values are always zero. If applied to a chart instead of backtested, no historical trades occur.

        I use Ninjatrader Continuum at the moment for market data.

        Comment


          #5
          I would not expect that setting IsSuspendedWhileInactive to true would cause a problem with using that indicator in your strategies logic.

          I think we may be having an issue with how Tick Replay is being implemented. Are you only using it to utilize the Cumulative Delta indicator?

          Can you provide a sample of how you are implementing your Tick Replay logic? Also, please go into more detail about these variable bartype ints you mentioned. Any samples of how that is being used would be appreciated as well.
          Josh G.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_JoshG View Post
            I would not expect that setting IsSuspendedWhileInactive to true would cause a problem with using that indicator in your strategies logic.

            I think we may be having an issue with how Tick Replay is being implemented. Are you only using it to utilize the Cumulative Delta indicator?
            One way is a daily range filter which requires tick replay in order to provide satisfactory results from the analyzer.

            Can you provide a sample of how you are implementing your Tick Replay logic? Also, please go into more detail about these variable bartype ints you mentioned. Any samples of how that is being used would be appreciated as well.
            I think this might be the relevant code. each item on the left is a series defined as instructed in Series<T> of the manual:

            Code:
            bartype[0] = AuADXVMA2.bartype;
                        dailybar[0] = AuADXVMA1.bartype;
                         orderflowclose[0] = (orderflowclose[1] +  OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk,  CumulativeDeltaPeriod.Bar, 0).DeltaClose[0]);
            orderflowclose seems to be summing nicely. Bartype is consistently zero on live data. Daily bar is the same concept, applied to a daily time frame added by AddDataSeries.

            I've attached the ADXVMA I am using to establish the bartype. It was free on the internet. As you can see I added a public int variable, and at the end where the bars are colored based on criteria I assigned each color of bar a public int value.

            Is it possible I need to reference series' CurrentBars in the above?
            Attached Files
            Last edited by liquid150; 04-27-2018, 11:23 AM.

            Comment


              #7
              Please write in to Platform(at)NinjaTrader(dot)com and reference this forum post. Please include your log and trace files, and strategy.

              You may follow the steps below to manually attach your log,trace, and strategy files to your response.

              Open your NinjaTrader folder under My Documents.
              Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
              Send the 2 compressed folders as attachments to this email.
              Once complete, you can delete these compressed folders.

              You can export your strategy by going to Tools > Export > NinjaScript Add On > Add > select your strategy > OK > Export > name the file 'NTsupport' > Save. The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.

              Thanks; I look forward to resolving this item.
              Josh G.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_JoshG View Post
                Please write in to Platform(at)NinjaTrader(dot)com and reference this forum post. Please include your log and trace files, and strategy.

                You may follow the steps below to manually attach your log,trace, and strategy files to your response.

                Open your NinjaTrader folder under My Documents.
                Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
                Send the 2 compressed folders as attachments to this email.
                Once complete, you can delete these compressed folders.

                You can export your strategy by going to Tools > Export > NinjaScript Add On > Add > select your strategy > OK > Export > name the file 'NTsupport' > Save. The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.

                Thanks; I look forward to resolving this item.
                Good morning Jim,

                I am getting an error zipping up my log and trace files. Am I correct to assume I need to do this while I am not running a different strategy on live market data?

                I spent the weekend double checking my work. I am still getting all zeros for bartypes on live data while it works fine on backtest.

                Comment


                  #9
                  I am not certain what the error is a result of, but you can send your log and trace files through the platform by going to the Control Center>Help>Mail to Platform Support.

                  Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default. You may include your script as an attachment by using the "Attachment" field at the top of the form.
                  Josh G.NinjaTrader Customer Service

                  Comment


                    #10
                    So I believe I fixed the problem today. I needed to change a series in the indicator to public and access it instead of creating a new variable. This solved the problem.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Rapine Heihei, Today, 08:19 PM
                    1 response
                    8 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by Rapine Heihei, Today, 08:25 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Rapine Heihei  
                    Started by f.saeidi, Today, 08:01 PM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by Rapine Heihei, Today, 07:51 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post Rapine Heihei  
                    Started by frslvr, 04-11-2024, 07:26 AM
                    5 responses
                    98 views
                    1 like
                    Last Post caryc123  
                    Working...
                    X