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

DrawVerticalLine doesn't work but DrawArrowUp works... Why?

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

    DrawVerticalLine doesn't work but DrawArrowUp works... Why?

    In NT6.5 I have very simple code of a strategy I'm trying to develop and am trying to draw a vertical line. In any case it sometimes draws the line on the last white arrow up. However under the same if statement, if I draw an arrow up, it draws. So technically it should draw both the arrow and the line on the same bar, but the vertical line never gets plotted... Why is this? I have a bunch of bars with a white arrows underneath, but no vertical lines. I only get a vertical line with the last bar with a white arrow. Why do these two functions work differently???

    I'm using two draw objects to test it with, the arrows always draw, but the vertical line, rarely gets drawn.

    Code:
           if( (Time[0].Minute == Time[1].Minute) )     //test
            {
                DrawArrowUp("Same minute" + CurrentBar, false, 0, Low[0] - .25, Color.White);    
                DrawVerticalLine("Same minute",0,Color.White,DashStyle.Dash,2);
            }
    In the end I plan on using the vertical lines only, and removing the arrows. I just had issues drawing lines and used arrows in place to test and only arrows seem to work correctly.
    Last edited by dennho; 03-25-2011, 03:50 AM.

    #2
    Please take a look at your tag id's used for the draw objects, the Arrow is drawn with a unique one for each object - while the Vertical Line just redraws only one object using the 'Same minute' tag.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Human#102, Today, 05:18 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by iq200, Today, 08:11 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by wuannetraam, Today, 07:43 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Human#102, Today, 07:52 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by sofortune, 05-10-2024, 10:28 AM
    8 responses
    64 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X