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

Plotting Text

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

    #16
    Originally posted by Crassius View Post
    I have long been frustrated with DrawText(). The Help sections DrawText() section includes this sample...

    DrawText("tag1", "Text to draw", 10, 1000, Color.Black);DrawText("tag1", "Text to draw", 10, 1000, Color.Black);

    If I put that into an indicator under OnBarUpdate I get nothing drawn.

    So I tried your example:

    DrawText("Shooting Star" + CurrentBar, false, "SS", 0, High[0] + 3, 0, Color.Black, new Font("Arial", 10, FontStyle.Bold), StringAlignment.Center, Color.Empty, Color.Yellow, 5) ;
    And still get nothing. It should run everytime OnBarUpdate runs.... but I get no text drawn.

    The reference code example, Indicator: Drawing unique objects and objects that update, says in its discription that it includes DrawText(), but it doesn't... it only has examples for DrawTriangle() etc.

    I really need to figure out how to use DrawText() as DrawTextFixed() is so limited.

    Why will even the example youhave given cut and pasted into my indicator not draw?
    That should draw. It sounds like something else is wrong with your indicator. Are there any messages in the log?

    Comment


      #17
      I got it plotting Koganam... it was plotting all along, just so high I couldn't see it. The currency is trading at 1.34XX and the drawing was set to be 3 above the bar, not .0003.

      Thanks for the help.. hope this thread helps more in the future.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Waxavi, Today, 02:10 AM
      0 responses
      3 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      8 views
      0 likes
      Last Post TradeForge  
      Started by Waxavi, Today, 02:00 AM
      0 responses
      2 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by elirion, Today, 01:36 AM
      0 responses
      4 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by gentlebenthebear, Today, 01:30 AM
      0 responses
      4 views
      0 likes
      Last Post gentlebenthebear  
      Working...
      X