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 algospoke, 04-17-2024, 06:40 PM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by bmartz, 03-12-2024, 06:12 AM
      3 responses
      28 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by Aviram Y, Today, 05:29 AM
      2 responses
      8 views
      0 likes
      Last Post Aviram Y  
      Started by gentlebenthebear, Today, 01:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by cls71, Today, 04:45 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X