NexusFi: Find Your Edge


Home Menu

 





NT7 Better Arrows and Other Symbols


Discussion in NinjaTrader

Updated
    1. trending_up 5,188 views
    2. thumb_up 9 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 3 attachments




 
Search this Thread
  #1 (permalink)
 
hunter548's Avatar
 hunter548 
western ny
 
Experience: Intermediate
Platform: ninjatrader
Broker: Amp Futures/CQG
Trading: 6E, ES
Posts: 102 since Nov 2009
Thanks Given: 197
Thanks Received: 93

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.

https://nexusfi.com/39695-post4.html

The following pic shows how the arrows look:


Attached Thumbnails
Click image for larger version

Name:	Snap1.PNG
Views:	441
Size:	33.5 KB
ID:	33283  
Attached Files
Elite Membership required to download: DualCCI_beta_v3.cs
Elite Membership required to download: WINDINGS3 CONVERSION.xls
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
 
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
2026 Fire Horse
5 thanks
  #3 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,715 since May 2010
Thanks Given: 203
Thanks Received: 2,688


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.


Follow me on X Reply With Quote
Thanked by:




Last Updated on March 10, 2011


© 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