Draw Close On Candlestick Charts That Do No Have An Outline

Names: DrawCandleClose, DrawCandleCloseWhite, DrawCandleCloseBlack

Author: James R. Walker

These indicators were created to show the Closing price when the CandleStick Opening and Closing price were the same and a Transparent Body Outline color was specified, when the Background color was not White. Standard NT 7 CandleStick Closing price is drawn with the Outline color and is Transparent when that color is Transparent, if the Background color is not White.

These Indicators are obsolete. Instead use fix described below. Attached file is a dummy file to meet posting requirements. Please download the file to log your interest in this fix, but do not install downloaded file. Instead, apply the fix manually. Never blindly replace standard files because of the risk of back leveling.

[COLOR=Red]NT 8 version fix is available at [/COLOR]
[URL="http://www.ninjatrader.com/support/forum/local_links.php?catid=7&linkid=700Updated:"]http://www.ninjatrader.com/support/forum/local_links.php?catid=7&linkid=700[/URL]

[SIZE=3]Examples:[/SIZE]
Top CandleStick:

Chart Style = Candlestick with Black outline.

Middle CandleStick:

Chart Style = CandleStick Transparent Outline After Fix

Bottom CandleStick on Black Background After Fix:

Chart Style = CandleStick, Candle Wick = White, Candle Outline = Transparent, Chart Property Background = Black and All markings that were Black = White.


[SIZE=3]

NT7 Fix for Tracking ID # SFT-818 , Missing Doji when CandleStick Outline Transparent.

[/SIZE]
[SIZE=2]Description:[/SIZE]

[SIZE=3][SIZE=2] Always draw the Doji Close line with the Wick Color instead of the Outline Color. This eliminates the inefficiency of having an Indicator check every CandleStick bar close for Open==Close and overwrite the already drawn Transparent Close line.

[/SIZE][/SIZE]

[SIZE=3][SIZE=2]Applying this fix in no way changes the appearance of CandleSticks that have bodies. This can be verified with the examples provided.

[/SIZE]
[/SIZE]


NT7: Line 490 Documents
injaTrader [email protected]
Replace:


[CODE]graphics.DrawLine(Pen, x - barWidth / 2, close, x + barWidth / 2, close);
[/CODE]

With:


[CODE]graphics.DrawLine(Pen[COLOR=Red]2[/COLOR], x - barWidth / 2, close, x + barWidth / 2, close);
[/CODE]

I recommend the following to apply the fix. It may seem complicated but will save you time in the long run.

Note that it is undocumented but NT Backup never includes files that begin with the character "@".
Attached file is a dummy to meet posting requirements.


1) Copy Documents
injaTrader [email protected]
2) Paste the file and rename it @ChartStyles.cs Before SFT-818
3) Edit @ChartStyles.cs with with Notepad
4) Make change to line 490
5) Compile any NT file with NT Editor. New @ChartStyles.cs will be used in the compile.
6) From next start of NinjaTrader, CandleSticks will use Wick Color for Doji Close line.
7) Copy Documents
injaTrader [email protected]
8) Paste the file and rename it @ChartStyles.cs After SFT-818

Any NT updates will replace @ChartStyles.cs so you will have to make the changes again.
You can use Winmerge to compare updated @ChartStyles.cs and @ChartStyles.cs After SFT-818 and reapply fix to updated.

Cleanup:

1) Delete Indicator DrawCandleClose.cs, DrawCandleCloseWhite.cs, and DrawCandleCloseBlackif, if they exist, from Documents
injaTrader 7binCustomIndicator.
2) Start NT Editor > Compile any Indicator to remove deleted Indicators.
NT will automatically remove the Indicator from any chart that use it.

Test:

Create a CandleStick chart with Transparent outline. Verify that you see Doji.

If you would like to have this fix standard NT8 CandleStick behavior, then post your vote for Tracking ID # SFT-818 to thread

[URL]http://ninjatrader.com/support/forum/showthread.php?t=79416[/URL]


All My Shared Indicators:

[URL]http://ninjatrader.com/support/forum/local_links_search.php?action=show&userid=1833&sort=d[/URL]

Created By Jim W.
NinjaTrader Version 7
File Size .2 KB
Create Date 02/03/2015
# of Downloads 250

Importing to NinjaTrader 7 is Easy!

To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:

  1. Download the app or add-on file to your desktop
  2. From the NinjaTrader Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file from your desktop

Questions?

Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.