Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculate.OnPriceChange over many unchanged bars

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

    Calculate.OnPriceChange over many unchanged bars

    I am looking for clarification about Calculate.OnPriceChange. The specifics are below:

    1) I have a strategy set to Calculate.OnPriceChange
    2) Primary bars: 1 minute bars
    3) I am currently LONG in the stock
    4) A trigger is set to CLOSE the trade. The trigger looks to an indicator on a previously closed bar.
    5) The indicator that will trigger the CLOSE changes from bar to bar. (ADX, RSI, Bollinger Band, etc. do this...)
    6) The price has not changed for six minutes, but there is a considerable amount of volume.

    Since the price hasn't changed in six minutes, would a valid CLOSE signal be skipped/ignored in minute three of this scenario?

    Thanks.
    Last edited by ArmKnuckle; 08-23-2019, 08:10 AM.

    #2
    Hello ArmKnuckle,

    Thanks for your post.

    The Calculate setting determines when the OnBarUpdate() method is called.

    Calculate.OnBarClose means the method and its code are run once at the end of the bar

    Calculate.OnEachTick means the method and its code are run once for every incoming tick.

    Calculate.OnPriceChange means the method and its code are run once for each change in price. If you have no change in price then the OnBarUpdate() would not execute.
    "Since the price hasn't changed in six minutes, would a valid CLOSE signal be skipped/ignored in minute three of this scenario?" if the conditions to generate the signal no longer exits when the OnBarUpdate() is called, correct a signal would not be generated.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X