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

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.

    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 trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      22 views
      0 likes
      Last Post trilliantrader  
      Started by Davidtowleii, Today, 12:15 AM
      0 responses
      3 views
      0 likes
      Last Post Davidtowleii  
      Started by guillembm, Yesterday, 11:25 AM
      2 responses
      9 views
      0 likes
      Last Post guillembm  
      Started by junkone, 04-21-2024, 07:17 AM
      9 responses
      68 views
      0 likes
      Last Post jeronymite  
      Started by mgco4you, Yesterday, 09:46 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X