• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawVerticalLine questions for time

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

    DrawVerticalLine questions for time

    hi guys , i saw in help a DrawverticalLines , i saw it got a parameters time , anyone can show me some example with this parameter ??
    thankz

    #2
    Hello faustf, thank you for your post and welcome to the NinjaTrader forum.

    A DateTime object will be used as that parameter. The Time array holds the timestamps of all bars as a DateTime object.

    This snippet will draw a line 5 bars ago:

    Code:
    protected override void OnBarUpdate()
            {
                if(CurrentBar < 5) return;
    
                DrawVerticalLine("theline", Time[5], Color.Red, DashStyle.Solid, 2);
            }
    Also, see this example on manipulating DateTime objects.

    Kind regards.
    Last edited by NinjaTrader_ChrisL; 07-17-2019, 08:55 AM.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      thank you so much

      Comment


        #4
        sorry again why you use dot Draw.VerticalLine ??? you use NJ8? ?? i use NJ7
        Last edited by faustf; 07-17-2019, 08:41 AM.

        Comment


          #5
          Hi faustf, apologies, I changed my previous post to reflect code for NinjaTrader 7.
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            Hi Chris , dont worry thankz again

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by yeshujbp, 07-21-2019, 02:40 PM
            2 responses
            31 views
            0 likes
            Last Post omololu
            by omololu
             
            Started by seagraph, Yesterday, 03:27 PM
            1 response
            23 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by NinjaCustomer, Today, 09:37 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_DrewO  
            Started by stalt, Today, 07:52 AM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by im197, 07-30-2019, 12:29 PM
            2 responses
            10 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X