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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    127 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    86 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X