Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,603 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X