• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

True or false one bar ago?

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

    True or false one bar ago?

    Hello

    How can I check if a condition was true or false one bar ago?

    #2
    Originally posted by Ironman9973 View Post
    Hello

    How can I check if a condition was true or false one bar ago?
    Depends on what you mean, but basically you index your code to one day ago. e.g., was one bar ago an upBar?
    Code:
     
    if (Close[1] > Open[1]) upBar = true;

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Newtrader101, Today, 04:50 AM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by utilizator, Today, 06:31 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by digibob, Today, 01:13 AM
    3 responses
    13 views
    0 likes
    Last Post digibob
    by digibob
     
    Started by calebsandfort, Yesterday, 05:16 PM
    2 responses
    9 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by StevenNelson, Yesterday, 05:45 PM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jermaine  
    Working...
    X