NexusFi: Find Your Edge


Home Menu

 





Creating a new HLC Chart Style (not an indicator)


Discussion in NinjaTrader

Updated
    1. trending_up 5,013 views
    2. thumb_up 12 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 2 attachments




 
Search this Thread

Creating a new HLC Chart Style (not an indicator)

  #1 (permalink)
 pawnbroker 
Cheltenham
 
Experience: Advanced
Platform: InvestorRT, NinjaTrader
Trading: ES
Posts: 54 since Jan 2012
Thanks Given: 8
Thanks Received: 107

I like HLC bars and I have tried the indicators on nexusfi.com (formerly BMT), but these are not a new type of bar objects and they do not get coloured by paint bar indicators for that reason.

I have looked for and found a way to add a new chart style for NT7, which does work with indicators that colour bars. This will be interesting if you want to see how to create a new chart style or if you want the option to use HLC bars.

NT has been extended to include Bloomberg style Mountain Charts by creating a new chart style. Taking that as an inspiration, I copied code from @ChartStyles.cs [1] for the OHLC chart style and modified that code to only show the HLC parts.

I am new to C# and NT and this is an advanced modification, so I would appreciate a review of the code by the experienced members, before posting the new chart type for general use.

Please take a look at the code and let me know if any modifications are needed. The version 1.0 copy is attached.

In my own tests it works fine, but I don't want to release this if there are obvious flaws!



Installation

Download HlcChartStyle.zip, then follow the usual import procedure. File, Utilites, Import NinjaScript

Use

Open a new chart and select HLC as the chart style or open the data series in an open chart and select HLC. These are the same steps you would follow to change from OHLC to CandleStick. Do not look for an indicator, because my code is not an indicator, its a new chart style.

Code Modification

This is not an indicator and you need to follow this method to make changes.
  1. Copy the Type directory from the zip file to your disk.
  2. Edit HlcChartStyle.cs with your text editor.
  3. Delete the Type folder from the zip file and replace with the modified version.
  4. Re-import the ChartType and accepting the warnings


Removing the New Chart Type

I am not sure how to completely remove the new chart style, but I can confirm that it can't be done by the method you use to remove an indicator via the NT GUI. After installing the new chart type, you should see HlcChartSyle.cs in the directory [1], but there may be other places with references to the chart style. So it may not be as simple as deleting the cs file from [1].


My Guess Work

@BarTypes [1] contains references to ChartStyleType.Custom0 to 9 and I do not understand how these work. The Mountain style chart has base(ChartStyleType.Custom3) and that did not work for me, so I tried Custom0 and that did work.

I don't know if these are "slots" that can be used or different specifications. For example, I installed the Mountain style charts first and that may have used up the "slot" for Custom3 and that may be why I was unable to get things to work. If that is correct, Custom0 may have worked because the slot was free on my machine.

If the Custom0-9 styles are slots, there could be deployment issues as the slot is hard coded into the new type and there may be a problem if that slot is already in use (not too likely, unless it becomes popular to create new chart styles!).

Line 97 public HlcChartStyle() : base(ChartStyleType.Custom0)


Screenshot showing HLC bars, coloured by Better ProAm



[1] \NinjaTrader 7\bin\Custom\Type

Attached Files
Elite Membership required to download: HlcChartSyle.zip
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
 
  #3 (permalink)
 pawnbroker 
Cheltenham
 
Experience: Advanced
Platform: InvestorRT, NinjaTrader
Trading: ES
Posts: 54 since Jan 2012
Thanks Given: 8
Thanks Received: 107


I have posted a new version of the chart style in the download section for NinjaTrader.

There are a few small changes to improve the appearance.

Started this thread Reply With Quote
  #4 (permalink)
millerol
Calgary Alberta Canada
 
Posts: 7 since Jan 2014
Thanks Given: 0
Thanks Received: 0

Thank you very much. This is good stuff!

Reply With Quote




Last Updated on January 18, 2014


© 2024 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 - Privacy Policy - Downloads - Top
no new posts