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 Mongo, Today, 11:05 AM
      4 responses
      14 views
      0 likes
      Last Post Mongo
      by Mongo
       
      Started by traderqz, Today, 12:06 AM
      7 responses
      14 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Skifree, Today, 03:41 AM
      5 responses
      13 views
      0 likes
      Last Post Skifree
      by Skifree
       
      Started by traderqz, Yesterday, 09:06 AM
      5 responses
      35 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by guillembm, Today, 11:25 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X