Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Time Frame Indicator

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

    Multi Time Frame Indicator

    I am trying to plot the 60 min Heiken Ashi over the 5 min chart. It should look like this:
    Click image for larger version

Name:	Indicator help 2.png
Views:	1046
Size:	13.5 KB
ID:	1175376

    This was on tradingview. However, when I try to do this within NT8 by adding multiple time frames and then plotting the 60 min on the 5 min chart, it looks like this:

    Click image for larger version

Name:	Indicator help.png
Views:	945
Size:	26.2 KB
ID:	1175377


    Is there an indicator setting that causes the stair stepping effect or does that need to be scripted?







    #2
    Hello,

    Thanks for your post.

    Yes, there's almost certainly a setting that is not identical to the chart you are comparing to. I'm not sure what the specific indicator you are using is, but I suspect it would have to with either the Period setting or Strength setting, if the indicator has such settings. If you can clarify what indicator this is and if its a stock indicator, a purchase from a vendor, or an indcator you personally coded, we could have a better idea. Can you also attach a screenshot of the indicator settings for both these charts?

    I look forward to your reply.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      The indicator is the EMA1 (Close) for the 1 hour Heiken Ashi, however, on a 5 minute chart. The indicator is called the KAMA and is a simple, open source, public indicator available on Tradingview's indicators list. It is in pinescript. The indicator is more complex than this. I had made them invisible to keep the question simply focused on the one indicator. However, here is the source code and the input parameters. Click image for larger version

Name:	Indicator Help 3.png
Views:	949
Size:	58.5 KB
ID:	1175485

      Click image for larger version

Name:	Indicator help 4.png
Views:	883
Size:	16.5 KB
ID:	1175486

      Thanks,

      Sam

      Comment


        #4
        Hello smcllr,

        Thanks for your reply.

        If you are looking for the KAMA indicator there is one that is standard with NinjaTrader.

        I've attached a screenshot that shows 5 minute ES 12-21 bars and the chart has a hidden 60 minute Heiken-ashi bar. I've added the KAMA indicator (Blue plot) with its standard settings of fast=2, slow=30, and period = 10 and applied that to the hidden 60 minute Heiken-Ashi bars of the chart. I've also applied a 1 period SMA to the 60 minute bars (gold plot).

        When an indicator is plotted on a higher time frame, on the chart, the chart indicator only has (in this case), a 60-minute close value every 12 5-minute bars. The plot will draw a straight line from one 60-minute actual data point to another 60-minute actual data point and this would be expected.


        Click image for larger version

Name:	smcllr-1.PNG
Views:	1187
Size:	63.0 KB
ID:	1175497


        I think you are looking to achieve this (below):

        This is a custom indicator that draws a plotline on every 5 minute chart bar at the value of the last closed 60-minute bar. You could create something like this if you wish, the code is shown in Ninjascript which is based on C#. The actual data points between this and the other chart are the same, the only difference is purely of appearance.


        Click image for larger version

Name:	smcllr-2.PNG
Views:	1131
Size:	93.3 KB
ID:	1175498


        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi Paul,

          Thanks for your reply.

          I am aware of the KAMA indicator. I think it is different in some way because I cannot get it to recreate the same price levels. Same with the MTF indicator which also had played around with.

          Is there no way to call a Heiken Ashi ticker from within the ninjascript to be applied to any standard 5 minute chart within one strategy or indicator? I just want this to be in one indicator that I can try and back test a crossover.

          Please advise on where I might learn how to do this?

          Thanks again,

          Sam

          Comment


            #6
            Hello Sam,

            Thanks for your reply.

            If you take a look at the code screenshot I showed in post#4, it demonstrates adding a 60 minute bar (not a heiken-ashi bar but it would be relatively the same) and then plotting on each bar of the 5 minute bars the value of the close of that 60 minute bar.

            Here is a link to the help guide that covers multi time frame/instrument coding: https://ninjatrader.com/support/help...nstruments.htm While this is a long read it does cover all aspects of the coding considerations.

            In addition, here is a link on AddHeikenAshi() method: https://ninjatrader.com/support/help...heikenashi.htm


            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mongo, Today, 11:05 AM
            0 responses
            2 views
            0 likes
            Last Post Mongo
            by Mongo
             
            Started by Tim-c, Today, 10:58 AM
            0 responses
            1 view
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by traderqz, Yesterday, 09:06 AM
            3 responses
            23 views
            0 likes
            Last Post NinjaTrader_ThomasC  
            Started by f.saeidi, Today, 10:19 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by kujista, Today, 06:23 AM
            5 responses
            18 views
            0 likes
            Last Post kujista
            by kujista
             
            Working...
            X