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 Davide999, 05-18-2023, 03:55 AM
      4 responses
      554 views
      1 like
      Last Post kcwasher  
      Started by Stanfillirenfro, Today, 07:23 AM
      2 responses
      10 views
      0 likes
      Last Post Stanfillirenfro  
      Started by rexsole, Today, 08:39 AM
      2 responses
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      6 responses
      29 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by gbourque, Today, 06:39 AM
      2 responses
      14 views
      0 likes
      Last Post gbourque  
      Working...
      X