• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Double value 1 bar ago

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

    Double value 1 bar ago

    Hi,
    For my indicator I only need double value from today and yesterday, so I need to access double value 1 bar ago. Can I do it not through DataSeries?
    Thank you

    #2
    Hello Tatiana,

    You may get a previous bars value by using a DataSeries using the brackets to get the previous bars value. Here is a post that you may view that has some examples of this.
    http://www.ninjatrader.com/support/f...ad.php?t=19346

    Note that to get the previous days value you will either have to only set the DataSeries on each new trading day or by getting the Bar number of the value that you would like to get.

    Let me know if you have any questions.
    JCNinjaTrader Customer Service

    Comment


      #3
      So, there is no "special" double that can store yesterday value? Can I have an example how to access double value by getting the Bar number of the value? Thank you in advance

      Comment


        #4
        Hello Tatiana,

        No, there is not special double that stores yesterdays value.

        Here is an example of how this can be done that you may view.

        To Import
        1. Download the attached file to your desktop
        2. From the Control Center window select the menu File > Utilities > Import NinjaScript
        3. Select the downloaded file

        Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.

        Happy to be of further assistance.
        Attached Files
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fsaryhjauuhh, Today, 01:03 AM
        0 responses
        1 view
        0 likes
        Last Post fsaryhjauuhh  
        Started by shmarola, Today, 01:01 AM
        0 responses
        1 view
        0 likes
        Last Post shmarola  
        Started by CriticalMind, 11-29-2015, 12:39 PM
        3 responses
        1,321 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by novel168, 06-14-2019, 09:20 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by johnnybegoode, Yesterday, 08:00 PM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X