Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Running an OnBarClose loop inside OnPriceChange

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

    Running an OnBarClose loop inside OnPriceChange

    My indicator is coded with OnPriceChange. Within this indicator, If I want a loop to check for inside bars, something which is only known when a bar closes. What's the best way to do it?

    Use 'IsFirstTickOfBar' and then reference if High[1] < High[2]] etc....? or is there another way?

    #2
    Hello lucyb,

    Yes that would be correct, you can use IsFirstTickOfBar to simulate bar closes when using OnPriceChange.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    128 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    73 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    116 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    109 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    88 views
    0 likes
    Last Post CarlTrading  
    Working...
    X