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

Multi time frame indicator values not correct on bigger TF

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

    Multi time frame indicator values not correct on bigger TF

    Hey guys,

    I'm trying to figure out why the bigger TF indicator values are not correct on my multi TF strategy. The smaller TF indicator values are correct. I built this simple script using the SampleMultiTimeFrame included with NJT.
    The script is simply adding the bigger secondary data series, the bigger indicator and then printing out the indicator values so I can check them. The bigger TF one is not correct.
    I'm just using the MACD standard indicator and printing out the value. When I tried this with the SMA indicator, it was correct. Not sure why the MACD is different.

    Steps to duplicate:
    1. Run the included script with RTY 12-18 contract with 1 minute as the primary data series for date 10/17/2018. The script adds the 15 minute data series.
    2. Check the MACD values in the Output Window. For example, at 6:00AM,

    10/17/2018 6:00:00 AM - BigMACD: -1.79744401229141. SmallMACD: 0.515067892503566

    The SmallMACD one is correct. The BigMACD one is not correct (if you load up a 15 minute RTY 12-18 chart for 10/17/2018). It should be: -1.68.

    Why the difference?

    #2
    Added strategy
    Attached Files

    Comment


      #3
      Hello PN720,

      Thank you for writing in.

      When I compare the script to the value displayed on the chart I'm not seeing an inconstancy.

      Are you able to replicate with the attached script? Do you have a session template applied to the chart series?

      I look forward to your reply.
      Attached Files
      Alan P.NinjaTrader Customer Service

      Comment


        #4
        Hi Alan,
        I'm just using the default trading hours for the instrument so no session template that I know of.
        For the script, did you mean to attach an indicator instead of a strategy? I'm not sure how to use it.

        Comment


          #5
          Hello PN720,

          Apply the indicator to a 1 minute chart and compare the prints in the output window with what you see for the MACD indicator applied to a separate 15 minute chart. Do they match? Are they different than what you're seeing in the strategy?

          I look forward to your reply.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Hi Alan,

            The indicator is correct and matches my 15 minute chart. The Strategy is still a little off.

            Indicator:
            10/26/2018 9:00:00 AM__-2.43649619059397

            Strategy:
            10/26/2018 9:00:00 AM - BigMACD: -2.39564888535051.

            Comment


              #7
              Hello PN720,

              You could build off the indicator I provided, or you could add prints to your strategy,

              I've provided a link to a youtube video which covers an example of using prints to understand behavior:
              https://www.youtube.com/watch?v=K8v_...tu.be&t=48m45s

              I've provided a link covering debugging which you may find helpful.
              Debugging: http://ninjatrader.com/support/forum...ead.php?t=3418

              Please let us know if you need further assistance.

              Alan P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Shansen, 08-30-2019, 10:18 PM
              24 responses
              938 views
              0 likes
              Last Post spwizard  
              Started by Max238, Today, 01:28 AM
              0 responses
              3 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by rocketman7, Today, 01:00 AM
              0 responses
              1 view
              0 likes
              Last Post rocketman7  
              Started by wzgy0920, 04-20-2024, 06:09 PM
              2 responses
              27 views
              0 likes
              Last Post wzgy0920  
              Started by wzgy0920, 02-22-2024, 01:11 AM
              5 responses
              32 views
              0 likes
              Last Post wzgy0920  
              Working...
              X