Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data from previous bars

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

    Data from previous bars

    Hello everyone....I'm tinkering around with custom indicators, and I've been working in forex on 1 second charts....using the Level 1 tutorial concerning "Using Price Variables" the formula is shown:

    Plot0.Set(Open[0] == Close[0] ? 1 : 0);

    I want to set up something like this:

    Plot0.Set(Open[120] >= Close[55] ? 1 : 0)
    Plot1.Set(Open[120] < Close[55] ? 1 : 0)

    Works well, but when I change "Open[0]" to anything more than "Open[1]" it just doesn't work...The little popup mentions that the number in the brackets represents "bars ago", so why won't it work

    Thanks,

    Jeff

    #2
    You are running into the issue outlined in this tip: http://www.ninjatrader-support.com/v...ead.php?t=3170
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Josh View Post
      You are running into the issue outlined in this tip: http://www.ninjatrader-support.com/v...ead.php?t=3170
      Thank you VERY much for your prompt reply...the math.min option worked very well!

      Thanks...NT is great!

      Jeff

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by reynoldsn, Yesterday, 07:11 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by PaulMohn, 04-30-2024, 02:06 AM
      9 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by algospoke, Yesterday, 06:36 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by set2win, 08-04-2021, 09:23 AM
      40 responses
      1,009 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by arunkumar3, 08-25-2023, 12:40 PM
      4 responses
      175 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X