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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      318 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X