NT7 Better Arrows and Other Symbols - NinjaTrader Programming | futures.io
futures.io futures trading

Go Back   futures.io

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

NT7 Better Arrows and Other Symbols
Started:March 9th, 2011 (11:10 PM) by hunter548 Views / Replies:2,333 / 2
Last Reply:March 10th, 2011 (10:22 AM) Attachments:3

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

NT7 Better Arrows and Other Symbols

Old March 9th, 2011, 11:10 PM   #1 (permalink)
Elite Member
western ny
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: Amp Futures/CQG
Favorite Futures: 6E, ES
hunter548's Avatar
Posts: 104 since Nov 2009
Thanks: 196 given, 90 received

NT7 Better Arrows and Other Symbols

I like darker backgrounds with white text. When using the DrawArrowUp() or DrawArrowDown() functions, I found out that NT7 automatically colors all symbol outlines to match the text color, hence white in this case. The same thing applies to other symbols like dots and triangles using similar DrawDots() and DrawTrianglesUp/Down() functions.

After spending some time researching the issue, I figured out the syntax needed to add solid color symbols to any NT7 indicator using DrawText(). Lacking a specific example to plagarize, I ultimately put the pieces together to create the solid arrows I wanted.

I thought I'd share exactly what code I wrote and where it goes within a program to make it easier to plagarize (and also so I could find it to use later myself). I started with TMFT's DualCCI_Beta_V2 and changed the dots displayed to arrows.

The updated indicator I renamed DualCCI_Beta_V3. If you open it for edit, you'll see where I commented what I changed or added. I'm not a programmer, so you may find mistakes I made, but I dabble a lot and it does what I wanted with the arrows.

The following hits the highlights of what I changed and/or added:

#region Variables

private bool drawArrowOnPricePanel = true;
private Color arrowUpColor = Color.DodgerBlue;
private Color arrowDnColor = Color.Red;

private System.Drawing.Font textFont;

protected override void OnBarUpdate()

textFont = new Font("Wingdings 3", 20);

DrawText("UpSymbol" + CurrentBar, true, "#", 0, Low[0]-pSeparation*TickSize, 0, arrowUpColor, textFont, StringAlignment.Center, Color.Empty, Color.Empty, 10);

DrawText("DownSymbol" + CurrentBar, true, "$", 0, High[0]+pSeparation*TickSize, 0, arrowDnColor, textFont, StringAlignment.Center, Color.Empty, Color.Empty, 10);

---- The # and $ characters define the Arial to Wingdings 3 conversion for the up and down arrow symbols I chose. I attached an excel spreadsheet to show other character possibilities and make it easier to convert to different symbol by substituting a different character.----

#region Properties
Lines 398 - 442
Changed dot references to Arrow references so you can choose to display arrows or not and change their color.

The following link gives gives a Ninjatrader link to how to use the DrawText() function.

Hma rising and falling arrows - Page 3 - NinjaTrader Support Forum

This link gives an indicator that shows the end result of using DrawText() with lots of arrow options and text boxes.


The following pic shows how the arrows look:

Attached Thumbnails
NT7 Better Arrows and Other Symbols-snap1.png  
Attached Files
Register to download File Type: cs DualCCI_beta_v3.cs (22.2 KB, 48 views)
Register to download File Type: xls WINDINGS3 CONVERSION.xls (26.5 KB, 59 views)
Reply With Quote
The following 6 users say Thank You to hunter548 for this post:

Old March 9th, 2011, 11:10 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old March 10th, 2011, 10:22 AM   #3 (permalink)
Elite Member
Denver, CO
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
NinjaTrader's Avatar
Posts: 1,165 since May 2010
Thanks: 132 given, 1,737 received

If I recall, instantiating new fonts is expensive and should be avoided thus, you should remove "textFont" from OnBarUpdate() and assign it in OnStartUp() only once.

Reply With Quote
The following 2 users say Thank You to NinjaTrader for this post:


futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > NT7 Better Arrows and Other Symbols

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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
Compare two Symbols Allansun NinjaTrader 4 November 13th, 2014 11:43 AM
Asian market Symbols for NT7 skyfly NinjaTrader 6 July 25th, 2011 10:05 PM
symbols and margin johni MultiCharts 1 July 9th, 2011 03:45 PM
Index Symbols TonyB Open E Cry 4 July 6th, 2011 12:17 PM
Trading Multi Symbols gmlee EasyLanguage Programming 1 February 1st, 2011 11:21 PM

All times are GMT -4. The time now is 05:41 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-26 in 0.08 seconds with 20 queries on phoenix via your IP