Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrect MACD values in strategy based on Heiken Ashi Candle

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

    Incorrect MACD values in strategy based on Heiken Ashi Candle

    I am developing a strategy based on Heiken Ashi candles. I put in the the bar type as Heiken Ashi in the backtester settings and print the value of MACD and MACD.Diff, i get incorrect results. I run the strategy on bar closes, so i expect the MACD(12,26,9).Diff[0] to have the value from the last closed bar that i see on the chart.

    An important thing to note is that, i want the indicators to compute the values based on the Heiken Ashi bars and so i run the strategy for the bar type of heiken ashi in the backtester settings. I don't pass any data series to the MACD function.

    Am i missing something here?

    #2
    Hello aviksamanta,

    Thanks for your post and welcome to the forums!

    What are you comparing the printed MACD values to (the chart in the strategy analyzer)?

    Can you provide a screenshot that illustrates the observations that the MACD values are incorrect?

    Thank-you.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response.

      I am comparing the print messages in the strategy analyzer with that in the charts.

      I want to verify, that if i want the indicator methods to be computed based on heiken ashi candles (rather than the normal bar periods), do i need to supply any data series in the indicator methods, or just specifying the bar type as Heiken ashi in the strategy analyzer/live strategy with the period set will direct the indicator methods use the Heiken ashi candles to compute?

      I will get you some screenshots based on your response.

      Comment


        #4
        Hello aviksamanta,

        Thanks for your reply.

        If you are using chart bars of the Heiken-Ashi type, these would be the input to the indicator.

        If you would prefer as it may be easier, feel free to send in your screenshots in an e-mail to PlatformSupport[at]NinjaTrader[dot]Com. Mark the e-mail Atten:Paul and please include a link to this thread.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your reply. After carefully checking my code lines, i found that i added a data series to my code which probably causing the issue. Once i removed it, it works just fine.

          I have 2 more questions, probably not related.
          1) Is it possible to backtest a strategy against a list of instruments or run it live against a list of instruments?

          2) Is it possible to have a 2 strategies running on 2 different connection?

          Comment


            #6
            Hello aviksamanta,

            Thanks for your reply, glad you were able to resolve.

            Yes, you can backtest the strategy on a list of your choosing.

            Yes, you can run the strategy live on a different instruments however, to be clear, you would have to assign/connect the strategy to the instrument when you add it to the strategy tab.

            Yes, the strategy is run connected/assigned to an account. you would have different accounts for the different connections.
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GLFX005, Today, 03:23 AM
            0 responses
            2 views
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            11 views
            0 likes
            Last Post XXtrader  
            Started by Waxavi, Today, 02:10 AM
            0 responses
            7 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Started by TradeForge, Today, 02:09 AM
            0 responses
            14 views
            0 likes
            Last Post TradeForge  
            Started by Waxavi, Today, 02:00 AM
            0 responses
            3 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Working...
            X