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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X