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

Drawing text

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

    Drawing text

    I'm trying to draw some text labels on my chart, but I'm unable to see them.

    For example, the following code draws the down arrow, but I don't see any text. I also tried replacing the ChartControl.Properties.ChartText with a regular color, but that didn't seem to make any difference.

    Draw.ArrowDown(this, CurrentBar.ToString(), true, 0, High[0] + TickSize, Brushes.DodgerBlue);
    Draw.Text(this, CurrentBar.ToString()+"Text", "high", 10, 1000, ChartControl.Properties.ChartText);

    Any idea what I'm missing here?

    #2
    Hello stewarco,

    Thanks for your post.

    This statement: Draw.Text(this, CurrentBar.ToString()+"Text", "high", 10, 1000, ChartControl.Properties.ChartText); will draw the word high 10 bars ago (from the current bar) at a price level of 1000.

    To match the draw arrow location try: Draw.Text(this, CurrentBar.ToString()+"Text", "high", 0, High[0] + 6 * TickSize, Brushes.DodgerBlue);

    You may need to increase the number of ticks above the high to clear the arrow.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      thanks that worked!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ZenCortexReal, Today, 08:52 AM
      0 responses
      0 views
      0 likes
      Last Post ZenCortexReal  
      Started by rocketman7, Today, 02:12 AM
      5 responses
      25 views
      0 likes
      Last Post rocketman7  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      7 responses
      28 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by samish18, 04-17-2024, 08:57 AM
      17 responses
      66 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by briansaul, Today, 05:31 AM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X