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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      113 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      60 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      40 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      82 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X