Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using of Price Data

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

    Using of Price Data

    Hi,

    I'm new in coding NinjaScript and have some elementary problems using the evaluation of price data. (High, Low, etc.)
    If I want to use for example the High or Low functions for any previous bar, the calculation logic doesn't work at all and it isn't possible to debug using the output window...

    Even a basic code snippet from the helpguide (see example1) doesn't work.

    Code:
    protected override void OnBarUpdate()
            {
                // Use this method for calculating your indicator values. Assign a value to each
                // plot below by replacing 'Close[0]' with your own formula.
                            
                if (Close[0] > Close[1])
                Print("We had an up day"); 
                
            }
    But: Every usage of the operations for the CurrantBar-Values work fine. (see example2)
    Code:
    Print(High[0].ToString());
    Who can help?

    #2
    If you want to access a prior bar you need to ensure there are enough bars in the series to check for a prior bar first. Please see this tip: http://www.ninjatrader-support2.com/...ead.php?t=3170
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      that's it! Now I can start and in the future address some more questions to you...

      thx for your quick respond!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by moehsan, Yesterday, 09:47 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by BraisedInBlue, Today, 06:43 AM
      0 responses
      6 views
      0 likes
      Last Post BraisedInBlue  
      Started by AaronKoRn, Today, 06:28 AM
      0 responses
      3 views
      0 likes
      Last Post AaronKoRn  
      Started by pjsmith, Today, 01:00 AM
      1 response
      13 views
      0 likes
      Last Post NT-Roland  
      Started by alejandro888, Yesterday, 08:41 PM
      0 responses
      9 views
      0 likes
      Last Post alejandro888  
      Working...
      X