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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X