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 sjsj2732, Yesterday, 04:31 AM
            0 responses
            30 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            286 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            282 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            132 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            90 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X