Drawcandleclose

Name: DrawCandleClose
Author:
James R. Walker

This indicator was created to show the Closing price when the CandleStick Opening and Closing price were the same and a Transparent Body Outline color was specified. Standard NT 8 CandleStick Closing price is drawn with the Outline color and is Transparent when that color is Transparent.

Note that NT7 had logic to draw a Black Close line, if the Outline color was Transparent and the Background color was White. This logic has been removed in NT8, so the problem appears in NT8 regardless of Background color.

his Indicator is 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.

NT 7 Version fix is available at

Examples


:


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.

NT8 Fix for Tracking ID # SFT-818 , Missing Doji when CandleStick Outline Transparent:
Description: Always draw the 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.

Applying this fix in no way changes the appearance of CandleSticks that have bodies. This can be verified with the examples provided.


NT8: Lines 63-64 Documents
NinjaTrader [email protected]
Replace:
TransformBrush(overriddenOutlineBrush ?? Stroke.BrushDX, new RectangleF(point0.X, point0.Y - Stroke.Width, barWidth, Stroke.Width));
RenderTarget.DrawLine(point0, point1, overriddenOutlineBrush ?? Stroke.BrushDX, Stroke.Width, Stroke.StrokeStyle);

With:
TransformBrush(overriddenBarBrush ?? Stroke2.BrushDX, new RectangleF(point0.X, point0.Y - Stroke2.Width, barWidth, Stroke2.Width));
RenderTarget.DrawLine(point0, point1, overriddenBarBrush ?? Stroke2.BrushDX, Stroke2.Width, Stroke2.StrokeStyle);

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
NinjaTrader [email protected]
2) Paste the file and rename it @CandleStyle.cs Before SFT-818
3) Edit @CandleStyle.cs Notepad
4) Make changes to lines 63 & 64 with Notepad



and save changes

5) Compile any file with NT Editor and Exit NT Editor. New @CandleStyle.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
NinjaTrader [email protected]
8) Paste the file and rename it @CandleStyle.cs After SFT-818


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


Cleanup:

1) Delete Indicator DrawCandleClose.cs, if it exists, from Documents
NinjaTrader 8binCustomIndicators.
2) Start NT Editor > Right click on blank form and select Compile to remove DrawCandleClose Indicator.
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 installed Chart Style Doji then:
1) Change Charts that use it to use CandleStick instead.
2) Delete ChartStyleDoji, if it exists, from Documents
NinjaTrader 8binCustomChartStyles.
3) Start NT Editor > right click on blank form and select Compile.


Created By Jim W.
NinjaTrader Version 8
File Size .2 KB
Create Date 10/17/2015
# of Downloads 294

Importing to NinjaTrader 8 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 Tools > Import > NinjaScript Add-On…
  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.