NexusFi: Find Your Edge


Home Menu

 





Draw.TextFixed by X and Y


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 1 posts (1 thanks)
    2. looks_two IanC55 with 1 posts (0 thanks)
    3. looks_3 KodaFT with 1 posts (0 thanks)
    4. looks_4 lakersfan with 1 posts (0 thanks)
    1. trending_up 3,568 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
lakersfan
Los Angeles, CA
 
Posts: 5 since Apr 2020
Thanks Given: 1
Thanks Received: 0

I am trying to draw.textfixed, or (draw.text) but the x, and y are by bars, and price.

How do I make it so that I can draw.text say right smack in the middle of the chart using pixel coordinates that does not move? how would I give it that location?


Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 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
  #2 (permalink)
 KodaFT 
Los Angeles CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 3 since Oct 2017
Thanks Given: 1
Thanks Received: 1

You would need to use Drawing Object "TextFixed" which would look like this:
 
Code
Draw.TextFixed(this, "tag", "Text to draw", TextPosition.Center);
Here's the help guide if you want to check the different syntaxes: https://ninjatrader.com/support/helpGuides/nt8/?draw_textfixed.htm


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



lakersfan View Post
I am trying to draw.textfixed, or (draw.text) but the x, and y are by bars, and price.

How do I make it so that I can draw.text say right smack in the middle of the chart using pixel coordinates that does not move? how would I give it that location?


You need to create a custom plot, overriding the OnRender() section.

Some help is available here:

https://ninjatrader.com/support/helpGuides/nt8/?using_sharpdx_for_custom_chart_rendering.htm

https://forum.ninjatrader.com/forum/ninjatrader-8/indicator-development/107779-help-with-custom-render


Reply With Quote
Thanked by:
  #4 (permalink)
IanC55
Aberdeen Scotland
 
Posts: 5 since Feb 2019
Thanks Given: 0
Thanks Received: 0

Using TextFixed you can only plot in 5 locations ie the corners or the middle

Alternative is to use Draw.Text which gives full control


Reply With Quote




Last Updated on May 18, 2020


© 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