Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using other values instead of iDataSeries in an indicator

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

    Using other values instead of iDataSeries in an indicator

    Greetings to all NT masters,


    I’m a beginner in NT with a fair knowledge of C# language.
    I am also using Metastock but I would like to invest in NT because of its flexibility.
    My first question is probably a silly one but I hope you will be gentle with me
    I can see that there are indicators that request for an iDataSeries type as a parameter.
    In many cases I need to plot the value of another indicator.
    For example in Metastock I can use this formula below
    ROC(MACD(),14,$)
    Which is (obvious) incorrectly translated to

    Plot0.Set( ROC(MACD(12, 26, 9),14));

    Could you please advise ?

    Best of luck,

    Marios

    #2
    Hello,

    Thanks for the note and welcome to the NinjaTrader support forum!

    This is actually correct you just missing the [0] at the end so that you tell NinjaTrader you want the current value of this for the current bar.



    Plot0.Set( ROC(MACD(12, 26, 9),14)[0]);

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hi Brett,

      Many thanks for your prompt reply.
      I promised that this would be a silly question, haven't' I?
      I also need another thing but i will open a new thread in case i don't manage to solve it.

      Great support you guys. Good to know you are here for us.

      Regards,

      Marios

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X