Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ROC of T3

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

    ROC of T3

    Hi, I'm new to using NT script. I'm trying to find the ROC of the T3 moving average. I've followed the tutorial for an indicator using another indicator for input. I'm getting the CS0021 error. Below is the code snippet I wrote. Any suggestions? The bars ago perhaps? Thanks.

    protected override void OnBarUpdate()
    {
    // Find ROC of T3
    double value = ROC(T3(6, 3, 0.7), 1)[0];
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    Plot0.Set(value[0]);
    }

    #2
    Hello,

    Thank you for your post and welcome to our forums!

    double values do not have an index assigned to it. The indexing takes place within the double value based on the ROC data series

    For your Plot0.Set, you just need to use the double "value":

    Plot0.Set(value);

    This value will update when the ROC updates.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Cheers Matthew!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      597 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      555 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X