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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          44 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          54 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          34 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          95 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          57 views
          0 likes
          Last Post PaulMohn  
          Working...
          X