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

Draw a x minute SMA/SMA/WMA on another timeframe?

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

    Draw a x minute SMA/SMA/WMA on another timeframe?

    Hi

    Can this be done in Ninja?

    I have a SMA or WMA or EMA or JMA indicator on one frame (could be tick/min/range), and I want to plot that same indicator on another frame.

    For example, if I have a 50SMA indicator on a 1min chart, I want to see the 50SMA on a 5min chart, but I dont want to add a 50SMA, I want to use 50SMA coming from the 1min chart.

    Dont know if you can can have a global indicator that can appear on multipul time frame?

    Thanks

    #2
    From a UI or indicator perspective, this is not possible in NT 6.5 or earlier however, this will be possible in NT7 or later. As a side note, this is possible in a strategy.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi Ray

      How does one do this as a strategy?

      Thanks

      Comment


        #4
        Hi ninjamouse, you want to check this link from our helpguide explaining the basics of MultiInstrument / MultiTime strategies - http://www.ninjatrader-support.com/H...struments.html

        You can also check the 'SampleMultiTimeFrame' code as a good starting point.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by ninjamouse View Post
          I have a SMA or WMA or EMA or JMA indicator on one frame (could be tick/min/range), and I want to plot that same indicator on another frame.
          Looking around the ninjatrader forums, I see lots of people asking about this type of thing, and though it's not directly supported in 6.5, we at http://www.eotprolive.com (shameless plug, I know...) have been working around it for about a year now.

          It's just a simple feature built into C# and other languages.... look at keyword "static", and you may see how it's done. You'll also need to be careful about multithreaded synchronization, and familiar with arrays and such, so it's not something a beginning programmer will be able to do.

          In the end, you have a (in your example) MA indicator you put on one time in "sender" mode, then put it on the chart you want to look at in "receiver" mode. They pass the values around in a thread-safe static storage location.

          I have made indicators for clients that receive values from 10 or more feeder charts with no problems, using this methodology and careful synchronization.

          The only annoyance with this method is that on rare occasions the receiver chart will lose its link to the sender if you change something on the chart... you just press F5 to reset the charts and they "find" each other again.

          I just thought I'd pass that along, since it looks like people are routinely told that it can't be done!

          And no, I don't have a simple example code for anyone... sorry... but I lease out proprietary indicators, and protected code is the nature of the beast.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by andrewtrades, Today, 04:57 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          3 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          6 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X