Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to change the indicator value n bars ago?

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

    How to change the indicator value n bars ago?

    At the beginning of each bar, I would evaluate and modify the indicator value of the previous bar, how can I do this in NinjaScript indicator? I think it can be done by DataSeries.set(barAgo, value). Then can I use the same technology to change the plot value so that my R/S line can be moved to different value during the realtime trading.

    This should be posted in an existing thread http://www.ninjatrader-support.com/v...ead.php?t=7136. I don't know how to delete or move a post. Sorry for creating a new thread.

    - Clearpicks
    Last edited by clearpicks; 04-23-2008, 07:55 AM.

    #2
    DataSeries.Set(int barsAgo, double value)
    RayNinjaTrader Customer Service

    Comment


      #3
      Thank you, Ray.

      Can I use the same technology to change the plot value so that my R/S line can be moved to different value during the realtime trading. The question is in this thread http://www.ninjatrader-support.com/v...ead.php?t=7136.


      - Clearpicks

      Comment


        #4
        Yes although I did not recommend this since it can be inefficient since each time a line value changed you would have to loop through all bars on a chart and reset the value. If you don't change the line value a lot this likely can be ok.
        RayNinjaTrader Customer Service

        Comment


          #5
          What if... you used Oscilliator lines as your R/S lines?

          Set the Oscillator lines to the values you want it to be at for R/S.

          Comment


            #6
            Could you be more specific? Thanks in advance.

            - Clearpicks

            Originally posted by mgbloomfield View Post
            What if... you used Oscilliator lines as your R/S lines?

            Set the Oscillator lines to the values you want it to be at for R/S.

            Comment


              #7
              Never mind... Just tried to modify the Oscillator's value in the OnBarUpdate event. Apparently, the value property is not available. It seems to be read only.

              Comment

              Latest Posts

              Collapse

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