Drawing a text on a chart report (Page 2) - NinjaTrader | futures.io
futures.io futures trading

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader

Drawing a text on a chart report
Started:March 26th, 2014 (01:12 PM) by Astrogirl Views / Replies:1,134 / 11
Last Reply:March 27th, 2014 (05:20 AM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Drawing a text on a chart report

Old March 26th, 2014, 05:17 PM   #11 (permalink)
Market Wizard
Birmingham UK
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
ratfink's Avatar
Posts: 2,824 since Dec 2012
Thanks: 8,470 given, 5,409 received
Forum Reputation: Legendary

Astrogirl View Post
Just done it!

The output windows gives me all the values correctly in some current bars (the ones related to the opened position, of course). Infact the strategy works as it due but the row

- DrawText("My text" + CurrentBar, "Stop_loss_price", 0, stop_loss_price, Color.Red);

It doesn't work as no data is drawn on the chart report.

Ok, then next couple of tests:

1) Try changing BarsAgo in the DrawText from 0 to say 10 or 20 (i.e. put it further back in the chart, just in case its always hidden by something)

2) Use the call
DrawTextFixed ("TLtext", "Stop_loss_price  " + stop_loss_price, TextPostion.TopLeft);
and you should always see the last stop in the top left hand corner of the chart.

You could also add in the time while testing as well, e.g. use
DrawTextFixed ("TRtext", Time[0].ToString(), TextPosition.TopRight);
Note CurrentBar not needed in these cases as the fixed text places always overwrite anyway.

NB Using "My text" + CurrentBar may not guarantee unique drawing items - especially if you make use of cut/copy/paste and forget to edit one, in which case if you are drawing two things with the same 'tag' only the second one will remain visible, I find it better to use a cut down but still related tag construction whether CurrentBar is needed or not.

e.g. instead of "My Text" + CurrentBar, use "Stop Loss" + CurrentBar and then elsewhere "Entry" + CurrentBar or whatever else is more likely to be 'safe'. I mention this as it has caught me out many (grrrr) times.

Travel Well

Last edited by ratfink; March 27th, 2014 at 04:01 AM. Reason: remembered a couple of related things
Reply With Quote
The following user says Thank You to ratfink for this post:

Old March 27th, 2014, 05:20 AM   #12 (permalink)
Trading Apprentice
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, YM, NQ, FDAX
Astrogirl's Avatar
Posts: 49 since Oct 2013
Thanks: 25 given, 4 received

Ratfink your help is great! I used the "Print" command to have results in the output window as you said and that is a great stuff!

The assignment of the stop_loss_price level comes in the actions of a condition group in the {....} and it seems doesn't work; well, when I put the Print command out of the {....} instead, it works!

The question could be: Does a variable be declared in the "if" actions set?

Last edited by Astrogirl; March 27th, 2014 at 10:25 AM.
Reply With Quote
The following user says Thank You to Astrogirl for this post:


futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > Drawing a text on a chart report

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing lines on chart subpanels ECI Ed NinjaTrader Programming 2 July 4th, 2013 01:58 PM
Chart buttons for drawing tools coding? hector24 NinjaTrader Programming 2 October 20th, 2011 08:44 PM
Drawing trailing stop on chart protrader007 NinjaTrader Programming 6 July 22nd, 2011 12:47 AM
Transferring drawing lines from one chart to another in Ninja spinnybobo NinjaTrader 14 August 9th, 2010 08:26 AM
Indicator with variable Text on Chart Henrik EasyLanguage Programming 6 May 14th, 2010 01:01 PM

All times are GMT -4. The time now is 08:53 PM.

Copyright © 2016 by futures.io. 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.
no new posts

Page generated 2016-10-20 in 0.10 seconds with 19 queries on phoenix via your IP