Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with Heiken-Ashi bars in NT8

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

    Problems with Heiken-Ashi bars in NT8

    I'm seeing a couple of issues trying to work with Heiken Ashi bars in NT8

    The HA bars are offset. Creating a historical chart with a standard tick candlestick and a tick Heiken Ashi with the same tick count results in disparate bar timestamps and volumes. (Shouldn't these two charts have exactly the same bar timestamps and volumes if they both start on the same date and have the same tick size?)


    First Bar time/volume: Normal = 17.11.08.160 / 112, HA = 17.11.08.160 / 143
    Second Bar time/vol: Normal = 17.14.43.649 / 143, HA = 17.14.49.746 / 104





    Historical and strategy optimizer do not produce usable results using Heiken-Ashi bars. It appears they are using Open[0] + slippage for entry/exit pricing. As open under Heiken Ashi doesn't have any relation to the current bar's price this produces large errors. Can I change historical processing to use some value other than Open[0] for prices?

    #2
    Hello pat9rb,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    For the backtesting in the Strategy Analyzer you can add an additional series to your strategy in code to submit orders to. Please refer to the information at the following link: https://ninjatrader.com/support/help...nstruments.htm

    For the historical bars not matching for tick bars I will report this to development.

    Please let me know if you have any questions.

    Comment


      #3
      Thanks for your reply and suggestion.

      FWIW, if a strategy is running on both the standard tick chart and on the HA tick chart, orders in historical will be filled on next bar after the trigger (as expected), but when live the HA chart fills on bar later (2 bars after trigger bar). Maybe this will help debug the problem.

      I've created an Heiken-Ashi indicator that can augment or replace the bars in a normal chart. I'd be happy to share my code with the community (FOSS). However, I used some code copied from NT's ChartStyles/CandleStyle to draw the candles. Does NT have an official policy about open-sourcing third-party add-ons that include NT's IP?

      Comment


        #4
        Hello pat9rb,

        Thank you for your response.

        This is expected to be resolved in the next major release of NinjaTrader 8.

        All NinjaScript files are open source. You can use the code from NinjaScript files in your own.

        Please let me know if you have any questions.

        Comment


          #5
          That's great to hear. Do you have a estimate when that release will drop?

          If I use NT code in my own add-ons, can I redistribute my add-on? For example, make the source available on Github?

          Comment


            #6
            A quick related question: Is there somewhere specific to submit bug reports?

            Comment


              #7
              Hello pat9rb,

              Thank you for your response.

              I would not have an estimated time for the release.

              You can in fact make your code public even if it uses NinjaScript code from one of the pre-loaded NinjaScript objects in NinjaTrader.

              We do not have a public database for bug reports. You can check the Release Notes for information on fixes and updates at the following link: https://ninjatrader.com/support/help...ease_notes.htm

              Please let me know if you have any questions.

              Comment


                #8
                Originally posted by pat9rb View Post
                Thanks for your reply and suggestion.

                FWIW, if a strategy is running on both the standard tick chart and on the HA tick chart, orders in historical will be filled on next bar after the trigger (as expected), but when live the HA chart fills on bar later (2 bars after trigger bar). Maybe this will help debug the problem.

                I've created an Heiken-Ashi indicator that can augment or replace the bars in a normal chart. I'd be happy to share my code with the community (FOSS). However, I used some code copied from NT's ChartStyles/CandleStyle to draw the candles. Does NT have an official policy about open-sourcing third-party add-ons that include NT's IP?
                Hello. I know this is a old post. Are you able to share your heiken candle custom code? I've been trying to create something like this for a while now but its almost impossible lol

                Comment


                  #9
                  Here you go. This repaints the chart bars. I haven't tested it against versions of NT since I wrote it, so no guarantees, but it will probably work. (FWIW - the fix NT added to the Strategy Analyzer made this indicator obsolete for our use) HTH
                  Attached Files

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by gentlebenthebear, Today, 01:30 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post gentlebenthebear  
                  Started by samish18, Yesterday, 08:31 AM
                  2 responses
                  8 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Started by Mestor, 03-10-2023, 01:50 AM
                  16 responses
                  389 views
                  0 likes
                  Last Post z.franck  
                  Started by rtwave, 04-12-2024, 09:30 AM
                  4 responses
                  31 views
                  0 likes
                  Last Post rtwave
                  by rtwave
                   
                  Started by yertle, Yesterday, 08:38 AM
                  7 responses
                  29 views
                  0 likes
                  Last Post yertle
                  by yertle
                   
                  Working...
                  X