Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 mishhh, 05-25-2010, 08:54 AM
            19 responses
            6,189 views
            0 likes
            Last Post rene69851  
            Started by gwenael, Today, 09:29 AM
            0 responses
            3 views
            0 likes
            Last Post gwenael
            by gwenael
             
            Started by Karado58, 11-26-2012, 02:57 PM
            8 responses
            14,829 views
            0 likes
            Last Post Option Whisperer  
            Started by Option Whisperer, Today, 09:05 AM
            0 responses
            2 views
            0 likes
            Last Post Option Whisperer  
            Started by cre8able, Yesterday, 01:16 PM
            3 responses
            11 views
            0 likes
            Last Post cre8able  
            Working...
            X