Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time Frame Continuity Indicator v1.0.0 11-16-2022

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

    Time Frame Continuity Indicator v1.0.0 11-16-2022

    I seem to be having some issues with the Time Frame Continuity Indicator v1.0.0.

    If I have a 5M chart loaded, the 5 minute line is correct but notice the 1 hour line..

    Click image for larger version

Name:	image.png
Views:	1078
Size:	61.5 KB
ID:	1268357


    Now for the exact same chart but loaded with 1H time frame the 1 hour line (60M) looks like this:
    Click image for larger version

Name:	image.png
Views:	1086
Size:	53.8 KB
ID:	1268358
    The 1 hour line is correct in the second chart but incorrect in the first chart. Can anyone offer some comments?​


    #2
    Hello Stevan,

    Thank you for your post.

    If you have questions or concerns about this indicator, please try reaching out to the creator for more information. This script seems to have been shared by damon_achey according to the page where you can download it:
    Thank you for using NinjaTrader.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Comment


      #3
      Hi Stevan, I'd be happy to help and I believe the indicator is correct in this case, please let me explain...


      The closing price of the previous 1H/60M bar is clearly 4524.00 @ 11:00am ET.

      First screenshot...
      The first screenshot of the 5m timeframe was taken at 11:18:31am ET (deduced from your "Time remaining" value) and the current price is 4524.25. So at that particular moment the previous 60M closed at 4524.00 and the price is now 4524.25, so the current 60M bar "in progress" should in fact be green, by only one tick.

      This 1 hour dot in the indicator will not "settle" until the 5M bar closes, and when it eventually did that 60M dot was green at 11:20:00am ET.


      Second screenshot...
      The second screenshot of the 60M timeframe was taken at 11:20:19am ET which is 108 seconds later (deduced from your "Time remaining" value) and the current price is 4523.25. So at that particular moment the previous 60M closed at 4524.00 and the price now is 4523.25, so the current 60M bar "in progress" should in fact be red, by about three ticks.

      This 1 hour dot in the indicator will not "settle" until the 60M bar closes, and when it eventually did it closed precisely at 4524.00 which was also the opening price, so it printed a final gray dot for unchanged at 12:00:00pm ET.


      Summary is that from 11:18am through approximately 11:22am the price was bouncing right at the close of the previous 60M bar causing the in-progress bars on the 30M and 60M to go from green to red and back each time price fluctuated.


      If that isn't clear please ask about which part doesn't make sense and I'll try and satisfy you.


      Thanks,
      Damon Achey
      Last edited by damon_achey; 09-11-2023, 07:17 PM.

      Comment


        #4
        Thank you for this explanation but I'm afraid that I perhaps did not explain my question well enough. While I understand your response, it is not exactly what my concern is.

        The screenshots are for the same ES contract but observed first on the 5M time frame and then on a 60M time frame.

        Looking at the first screenshot and going from right to left on the 1H line, the dots/colors go:
        G R R R R G G G G G G G R G G R R R R R > and so on.

        Looking at the second screenshot and going from right to left on the 1H line, the dots/colors go:
        R R R G R G G R G G G G R G G / G G R R R > and so on. / = Grey

        First screenshot > G R R R R G G G G G G G R G G R R R R R
        Sec screenshot > R R R G R G G R G G G G R G G / G G R R R

        If this is all past 1H data, shouldn't the dots/colors all be the same regardless of what time frame we have loaded on the chart? (And I believe the 4H line also is different from the 5M to the 60M line as well as the 1D and 1W lines).

        Comment


          #5
          I apologize for the delay, I never got a notification of the response post.

          In the second chart the 60m dots each represent one chart bar. So the dot color will always be the bar color 1 for 1.

          In the first chart each dot in the 60m row is what the hour bar is/was doing at the time that 5m bar printed. So as the twenty 5m bars go by that make up that hour the 1 hour row is telling you what color the hour bar (that is still in progress) would have been at that 5m bar close if that makes sense.

          So it sort of gives you a snapshot of what the higher timeframes would have been at that moment even though they haven't close yet.

          Comment


            #6
            Does anyone know if there is a version of this that depicts CLOSED candles, instead of open?

            Comment


              #7
              Been using this indicator. I noticed it has plots. Is it possible to set an alert or use in strategy? If so, any suggestions on settings? I've tried a variety of settings, but doesn't seem to work.
              Attached Files

              Comment


                #8
                I've thought about it and though it presents a nice history in a compact visual presentation I don't think it would be very efficient for strategies. Basically every dot is just timeframe[1] > timeframe[2] = green or opposite for red. And it loads a bunch of timeframes.

                For a strategy you would could code just the specific time frames you cared about directly without much effort.

                Comment


                  #9
                  Thanks for your response Damon. I figured out some ways to integrate it into alerts/strategy, so it's working great. Appreciate it!

                  Comment


                    #10
                    Originally posted by damon_achey View Post
                    I've thought about it and though it presents a nice history in a compact visual presentation I don't think it would be very efficient for strategies. Basically every dot is just timeframe[1] > timeframe[2] = green or opposite for red. And it loads a bunch of timeframes.

                    For a strategy you would could code just the specific time frames you cared about directly without much effort.


                    I've been analyzing the v1.0.0 code and believe I've found a critical bug in how historical bars are calculated, which causes them to show different results than real-time bars.

                    The Issue: Inconsistent Logic

                    The OnBarUpdate method has two different logics:

                    1. For Real-Time Bars: It correctly compares the current price (Closes[0][0]) to the higher timeframe's Open (Opens[i][0]).

                    2. For Historical Bars: The if (State == State.Historical) block overrides this. It incorrectly compares the primary bar's Close (Closes[0][0]) to the higher timeframe's Close (Closes[i][0]).

                    Why This Is a Bug

                    This Close vs. Close comparison for historical bars is flawed. For a developing bar (like a 1-hour bar), its "Close" at any given 5-minute interval (Closes[i][0]) is the same as the 5-minute bar's close (Closes[0][0]). This results in the indicator painting "Gray" (neutral) dots for most of the chart's history, which is not the correct behavior.

                    This inconsistency means that any historical analysis or backtesting is unreliable, as the indicator behaves one way on past data and a completely different way in live trading.

                    The Solution

                    The fix is very simple: remove the entire if (State == State.Historical) block from the OnBarUpdate method.

                    By removing it, the indicator is forced to use the single, correct logic for all bars:

                    var open = Opens[i][0];

                    var close = Closes[0][0];

                    This makes the indicator's behavior 100% consistent in both real-time and on historical data.

                    I hope this feedback is helpful! Thanks again for your work on this

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    547 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    323 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    99 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    543 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    545 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X