Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar count between Entry and Exit of a Tick Chart

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

    Bar count between Entry and Exit of a Tick Chart

    Given a 750 Tick Chart as an example (see pic) I want to be able to have code that returns the value of 6 or 7, if there are 6 or 7 Bars from the Long to the Exit. Again, these bars are created from a 750 Tick Chart. So, my code can be adjusted to return the number of bars after the Long Entry and do some check on its HLCO. My print statement shows a result of 148 between the LONG Entry and the Sell. Which, of course, doesn't make sense to me. I need some help counting correctly. The Print statement is printed immediately after the Sell. Print result is: Current Time is 110333 BarsSince LONG entry = 148. Anyone know the needed code using a Tick chart that counts the bars such that I can operate on a value that represents the visible bar count of a Tick chart? Please see the attached Snippet of my chart for reference. Thank you in advance for any help.
    Attached Files

    #2
    I think i got it now. Sorry for the stupid question. I'm kinda new to this strategy building and using Tick data specifically.

    Comment


      #3
      Hello thumper57,

      I just wanted to confirm that you have answered your question, if you still need assistance please provide a follow up with the updated questions you have, it would be helpful to include any relevant sets as images if you have questions about the conditions you made.

      Comment


        #4
        Hi Jesse,

        Thanks for getting back to me. It a bit weird to me how to negotiate (code) that Tick Charts like 500 Tick, has up to 500 ticks per candle but TickSize (for ES) is $0.25.

        I think this is working but if you can confirm its validity. Will this allow me, if "true" to execute "something" on the bar immediately after the LongEntry() regardless of the Tick Chart used: if (BarsSinceEntryExecution("LONG") == 1 ) <something>

        Thanks,
        Dave

        Comment


          #5
          Hello thumper57,

          Yes that method tells you how many bars it has been since the entry orders execution. That works based on the series you used so it would be X primary bars since the entry filled.

          Comment


            #6
            Thank you Jesse again!

            Before this statement, I was counting the actual ticks and then trying to do some math to get to the next bar. Entry with a tick chart could be anywhere inside the candle and any number of ticks. I eventually found there is a much simpler way. I am still finding my way and finding examples on this forum and of course your team excellent guidance. Thank you ALL!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            61 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            39 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            21 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            23 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            51 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X