Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

.Set with two parameters

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

    .Set with two parameters

    Hi,

    I have an indicator in NT7 that has this code:

    Linea1.Set(1, Linea2[1]);

    How can I write this code for NT8, please?

    Thanks and regards.

    #2
    Hello soyjesus,

    Thank you for your post.

    You would reference the specific index but 'Set' is no longer present. For example:
    Code:
    Linea1[1] = Linea2[1];
    Please refer to the information on Plots at the following link: http://ninjatrader.com/support/helpG...n-us/plots.htm
    Please also reference the code breaking changes: http://ninjatrader.com/support/helpG...ng_changes.htm

    Please let me know if you have any questions.

    Comment


      #3
      Hi
      I am trying to begin the (lengthy) process of converting to Ninja8, and on one indicator i am down to the last couple of errors but have hit a wall... I have a similar issue with .Set .....In ninja7 it works (obviously) and i have

      if(CurrentBar<tlength+1) return;
      Havg = SMA(High,tlength)[1];
      Lavg = SMA(Low,tlength)[1];
      if(Input[0]<Lavg) swing = -1;
      if(Input[0]>Havg) swing = 1;
      if(swing==-1)
      {
      if(previous_swing!=swing) Draw.ArrowDown(this, CurrentBar.ToString(), true, 0, Havg, Brushes.Gold);
      S=Havg;
      }
      where Lavg is a double. I have tried using the following in Ninja8
      S = Lavg;
      but its saying that the "property or indexer .... cannot be assigned to - it is read only" and also "cannot implicitly convert type 'double' to 'NinjaTrader.NinjaScript.Series<string>'

      Any ideas?

      Thanks in advance....

      Comment


        #4
        Hello Daniel008,

        Thank you for the post.

        I am reviewing your inquiry and will be back with a reply shortly.

        I look forward to assisting further.

        Comment


          #5
          Hello Daniel008,

          Thank you for your patience.

          I will need more information about the line where this error is occurring.

          Can you please locate the line of code where this error is occurring and post it in your next reply?

          You reference this line in your initial inquiry:

          S = Lavg;

          If this is the line where the error occurs, please post the lines where these variables are initially declared.

          I look forward to your reply.

          Comment


            #6
            Hi Chirs - thanks for replying, but since posting i've soted it out. Thanks again

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            561 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            325 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
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X