Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to modify the value of Series<int>

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

    how to modify the value of Series<int>

    In my indicator, I created a Series<int> . and I gave values 1 to some of Series[].

    After get the values, the indicator need to modify the value of some Series<barAgo>, I tried to give 0 to topSeries[tempBarsTwoAgo] agin. like below:

    topSeries[tempBarsTwoAgo]=(0);
    topSeries[tempBarsAgo]=(0);

    But it seems the value didn't go back 0.

    Do I need use reset(tempBarsTwoAgo) to get 0 value?

    #2
    Hello LadGta2018,

    Thank you for your note.

    Without the full code we're unable to test on our end.

    If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      my question is how to modify the value of Series. I don't understand why you asking the whole code.
      could you just tell me gernerally how to modify the value of a INT Series?


      Originally posted by NinjaTrader_AlanP View Post
      Hello LadGta2018,

      Thank you for your note.

      Without the full code we're unable to test on our end.

      If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

      I look forward to your reply.

      Comment


        #4
        Hello LadGta2018,

        Attached is an example of how you could set a previous series value to another value. The indicator sets the series on each bar to the closing price. However once we reach the most recent bar, I set the value of the series 5 bars ago, to 5, then print the value of the series 5 bars ago and you’ll see in the output window (Control Center>New>Output), a 5 printed.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Thanks a lot.

          Originally posted by NinjaTrader_AlanP View Post
          Hello LadGta2018,

          Attached is an example of how you could set a previous series value to another value. The indicator sets the series on each bar to the closing price. However once we reach the most recent bar, I set the value of the series 5 bars ago, to 5, then print the value of the series 5 bars ago and you’ll see in the output window (Control Center>New>Output), a 5 printed.

          Please let us know if you need further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          646 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          367 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X