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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    63 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X