Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

converting nt7 indicator to nt8

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

    converting nt7 indicator to nt8

    Hi,

    I had this code from NT7 which I'm trying to convert to NT8 and I think I just have a little bit left to go.

    Here is the code:
    Code:
    if (SumABS > 0) DemarkREI = Sum / SumABS;
    TDREI = 100*DemarkREI;
    rei[0] = (TDREI);
    
    if (IsRising(rei))
    {
    [B]if(!wasRising) Up.Set(1,rei[1]);[/B]
    Up[0] = (TDREI);
    wasRising=true;
    }
    else
    {
    [B]if (wasRising) Down.Set(1,rei[1]);[/B]
    Down[0] = (TDREI);
    wasRising=false;
    }
    I'm not sure how to convert the 2 lines I've highlighted in BOLD. If it helps, "Up" and "Down" are from AddPlot. Could someone please help?

    Regards
    Kay Wai

    #2
    Hello kaywai,

    Thanks for your post.

    From the code breaking changes document:"The DataSeries.Set() method used to assign Data Series or Plot values has been removed and values can now be stored using a single assignment operator:"

    Reference: https://ninjatrader.com/support/help...hangesOverview

    In NinjaTrader7 you would use.Set() to assign a value to a plot. In NinjaTrader8 you just assign it directly.

    Up.Set(1,rei[1]) is setting the Plot's previous bar to the previous bar of the series rei. In NinjaTrader8 that would be Up[1] = rei[1];

    Same with the Down plot.

    Last edited by NinjaTrader_PaulH; 12-30-2021, 08:27 AM.

    Comment


      #3
      Thank you Paul! Let me try that out.

      Kay Wai

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 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