Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text Ninja 8 Vanishing

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

    Draw.Text Ninja 8 Vanishing

    Hi
    I am converting from Ninja 7 to 8

    I am using Draw.Text

    Draw.Text(this, "ABC", true, "ABC", 0, High[0] + 8 * TickSize, 20, Brushes.Red, myFont,TextAlignment.Center,Brushes.Transparent, Brushes.Transparent, 0);

    When the condition is met, ABC appears on the chart. However, when the condition is met again at a later time, the first ABC disappears and the second instance appears. How do i keep both instances on the chart.

    There are no log errors

    #2
    Just as in NT7, you need to make sure to keep your tags unique for every instance, otherwise they will be updated when the method is called again for the new condition

    Code:
    Draw.Text(this, "ABC"+CurrentBar, true, "ABC", 0, High[0] + 8 * TickSize, 20, Brushes.Red, myFont,TextAlignment.Center,Brushes.Transparent, Brushes.Transparent, 0);
    Using the above, the ABC tag will append the CurrentBar number to it, keeping it unique.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Unsuitable, Today, 07:26 PM
    0 responses
    1 view
    0 likes
    Last Post Unsuitable  
    Started by jvanelli, Today, 06:36 PM
    1 response
    6 views
    0 likes
    Last Post jeronymite  
    Started by twitch251, Today, 05:14 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by robforee2, Today, 05:07 PM
    0 responses
    4 views
    0 likes
    Last Post robforee2  
    Started by blar58, Today, 03:16 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Melissa  
    Working...
    X