NexusFi: Find Your Edge


Home Menu

 





Draw Text with multiple lines option


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ceramictilepro with 1 posts (0 thanks)
    2. looks_two Fat Tails with 1 posts (2 thanks)
    3. looks_3 cory with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,877 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?
Datafeed for Atas
Platforms and Indicators
Would a node-based workflow for automated trading be useful?
Traders Hideout
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Fed Hike Odds at 57% After Warsh: England Surges 12.9%, …
Prediction Markets & Event Contracts
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary 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,117


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
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


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