Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indictor on Indicator

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

    Indictor on Indicator

    I'm new to Ninja, trying the V6 Simulation. I can't seem to find how to apply an indicator to an indicator. For example a 5 period SMA to a MACD Histogram.Is this possible, can someone point me in the right direction?

    Thanks,

    Guy


    TraderGuy
    NinjaTrader Ecosystem Vendor - EMS

    #2
    imported post

    a) You can not configure an indicator on indicator by NT UI.
    b) However you can code your own indicator by NinjaScript. To e.g. run an 14 period SMA on the MACD Diff (MACD has 3 data series: Macd, Avg and Diff), you could do something like this in your OnBarUpdate method:
    Code:
     protected override void OnBarUpdate()
     {
     Plot0.Set(SMA(MACD(12, 26, 9).Diff, 14)[0]);
     }
    I suggest starting of wizard generated indicator template and take it from there.

    Comment


      #3
      imported post

      Thanks, that works but it seems to limit me to four parameters. If I want to specify the MACD parameters and two SMA lines will I need to bypass the wizard and code it manually?

      Thanks

      Guy




      TraderGuy
      NinjaTrader Ecosystem Vendor - EMS

      Comment


        #4
        imported post

        Yes, you would need to manually add additional inputs.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Great, got it working with five inputs. Thanks for the responses.

          Guy
          TraderGuy
          NinjaTrader Ecosystem Vendor - EMS

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          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  
          Started by wzgy0920, 04-23-2024, 09:53 PM
          2 responses
          49 views
          0 likes
          Last Post wzgy0920  
          Started by Kensonprib, 04-28-2021, 10:11 AM
          5 responses
          193 views
          0 likes
          Last Post Hasadafa  
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,235 views
          0 likes
          Last Post xiinteractive  
          Working...
          X