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,101 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 1 attachments




 
Search this Thread

Draw Text with multiple lines option

  #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?
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
43 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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
The following 2 users say Thank You to Fat Tails for this post:
  #4 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


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 Twitter Reply With Quote





Last Updated on July 20, 2014


© 2024 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 - Privacy Policy - Downloads - Top
no new posts