NexusFi: Find Your Edge


Home Menu

 





Draw Text with multiple lines option


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cory with 1 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 Beljevina with 1 posts (3 thanks)
    4. looks_4 ceramictilepro with 1 posts (0 thanks)
    1. trending_up 4,679 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

Hello,

Currently the standard DrawText only allows one line of code I believe.

I was looking to be able and use the DrawText allowing multiple lines. Can anyone point me to the right direction where I could see a sample?

Thanks in advance


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CFTC Requests Tag 50 Trader Identity Data From CME and I …
Traders Hideout
CFTC Rewrites the Rulebook -- Kalshi Cracks $1B Non-Spor …
Prediction Markets & Event Contracts
Energy Futures Shatter All-Time Daily Volume: 8.3 Millio …
Commodities
More Than Capable: Hegseths War Warning Validates $114M …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


You can use a custom plot to code it. One example is the SessionVolatilityBands V38, see lines 1745 to 1757.

The text can be seen on the chart below.

It all depends on where you want to plot the text.


Reply With Quote
Thanked by:
  #4 (permalink)
 
cory's Avatar
 cory 
virginia
the coin hunter
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,093


ceramictilepro View Post
Hello,

Currently the standard DrawText only allows one line of code I believe.

I was looking to be able and use the DrawText allowing multiple lines. Can anyone point me to the right direction where I could see a sample?

Thanks in advance

look at ninja ConstantLines indicator.


Reply With Quote
  #5 (permalink)
 
Beljevina's Avatar
 Beljevina 
Toronto, Canada
 
Experience: Advanced
Platform: NinjaTrader, SierraCharts
Broker: Amp/CQG, IB
Trading: CL, GC, 6E, ES, RTY, EURUSD, GBPJPY, AUDUSD
Posts: 352 since Sep 2010


ceramictilepro View Post
Hello,

Currently the standard DrawText only allows one line of code I believe.

I was looking to be able and use the DrawText allowing multiple lines. Can anyone point me to the right direction where I could see a sample?

Thanks in advance

Yes, I know this is a years old post.

But, I was looking for the same feature, and after trying to insert a hard-return via ASCII string concatenation or using multiple DrawTexts (which would be resource consuming), I realized that inserting a "\n" moves the next text to a second line. Example follows, which in my case I am on the second line of the DrawText printing the timeframe of the chart and the type of chart it comes from, ie., 5m or 800T


 
Code
base.DrawText("MyText" + base.CurrentBar, true, "MyText Line 1" + "\n" + "MyText Line 2" + BarsPeriod.Value.ToString() + BarsPeriod.Id.ToString().Substring(0,1)  , 0, base.High[0] + num3, 0, this.BearishColor, this.MyFont, StringAlignment.Center, Color.Transparent, this.BearishColor, this.op);


Follow me on X Reply With Quote




Last Updated on July 20, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts