Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Segwin, 05-07-2018, 02:15 PM
              10 responses
              1,767 views
              0 likes
              Last Post Leafcutter  
              Started by Rapine Heihei, 04-23-2024, 07:51 PM
              2 responses
              30 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by Shansen, 08-30-2019, 10:18 PM
              24 responses
              943 views
              0 likes
              Last Post spwizard  
              Started by Max238, Today, 01:28 AM
              0 responses
              9 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by rocketman7, Today, 01:00 AM
              0 responses
              7 views
              0 likes
              Last Post rocketman7  
              Working...
              X