Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to determine when a vertical gridline has been crossed (on a Tick Chart)?

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

    How to determine when a vertical gridline has been crossed (on a Tick Chart)?

    If you pop up a tick chart, let's say 200 ticks, then there are these vertical grid lines every so often.

    Is there any way to know programatically when a new line has been drawn?

    e.g. in a time chart you would just know it occurs every so many minutes... but I have no idea how to know in tick chart.

    I want my strategy to know when a vertical grind line on a tick chart has been crossed.

    #2
    Hm? My vertical grid spacing is based on how many bars have passed. There is a new line every 6 bars (so it would be bar 1,2,3,4,5,line with bar 6,1,2,3,4,5,line&6).

    This is the case regardless of time interval of the chart.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      how do you know if you are on bar 2 or 5 for example of the 6? and how do you programatically determine the interval is 6 bars?

      Comment


        #4
        You can do math based off of the CurrentBar property. I don't know why you would need to programmatically determine the spacing is 6 bars? That is just the way NinjaTrader was designed to place that spacing for the vertical gridlines.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          thanks, just a simple way to exit the trades on non-time based charts.

          Comment


            #6
            Ok. Well the lines are based off of number of bars and not a time/tick interval so my previous suggestion about some math with CurrentBar should do.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            331 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            549 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            550 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X