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 jcbinks, Today, 03:32 PM
            2 responses
            14 views
            0 likes
            Last Post jcbinks
            by jcbinks
             
            Started by Stefan Mayer, Today, 03:09 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by M_ichel, Today, 03:18 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by ralett, Today, 02:43 PM
            2 responses
            15 views
            0 likes
            Last Post ralett
            by ralett
             
            Started by Nightmaregpu, Today, 02:18 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X