Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price churn within a bar

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

    Price churn within a bar

    Anyone got any ideas on how to program an indicator that will detect price on a tick basis that is bouncing say <> 3 or 4 ticks and when it happens, increment a counter?

    I have tried using MarketDataType.Last and then ePrice but you can't use barsAgo with ePrice.

    Is the close equivalent to Last on a tick basis?

    If so, then the Close[0] > Close[1] || Close[0] < Close[1] could be used to increment the counter.

    Any advice appreciated.

    Thanks

    #2
    Originally posted by gdavis74 View Post
    Anyone got any ideas on how to program an indicator that will detect price on a tick basis that is bouncing say <> 3 or 4 ticks and when it happens, increment a counter?

    I have tried using MarketDataType.Last and then ePrice but you can't use barsAgo with ePrice.

    Is the close equivalent to Last on a tick basis?

    If so, then the Close[0] > Close[1] || Close[0] < Close[1] could be used to increment the counter.

    Any advice appreciated.

    Thanks
    Okay - thinking outside your requirement - have you tried NT's range bars?

    Comment


      #3
      Hello gdavis74,

      If you are using CalculateOnBarClose (COBC) false, then yes "Close[0]" is going to be the most current tick data coming in.

      If your strategy requires the use of COBC true, then you may try using "Close[0]" inside of OnMarketData() so that you may get the Close price of the last completed bar while the current bar is being formed.

      Let me know if we can be of further assistance.
      JCNinjaTrader Customer Service

      Comment


        #4
        Ok, then Close will work because this indicator would not use COBC true. Thanks much!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        82 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        43 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Working...
        X