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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    59 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    41 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    46 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    37 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    157 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X