Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

HLC ChartStyleType

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HLC ChartStyleType

    Alright, well seeing as there have been so many requests for this, for several years, and seeing as I recently realized how badly I want them, I have modified the ChartStyleType Ninja script to include another chart type, HLC.

    1) find the folder Documents -> Ninjatrader7 ->bin->Custom->Type
    2) move the file called "@ChartStyles" to the desktop (just to have it as a backup)
    3) download the new file to the folder listed above
    4) open Ninja, if not already open, and then click Tools->Edit->Indicator
    5) Select any indicator, doesn't matter
    6) Click Compile on the top bar
    7) Restart NinjaTrader
    8) Open a new chart and there should now be a HLC style

    This was actually as simple as deleting a single line of code from the OHLC ChartType. I first copied all that, and then added it again, renaming everything to HLC. The only hang up was this conversion:

    public OhlcStyle() : base(ChartStyleType.OHLC)
    to
    public hlcStyle() : base(ChartStyleType.Custom0)

    as simply changing the OHLC following the ChartStyleType to HLC didn't work. I've had a couple friends test it and it works for them, so I presume it will work for everyone.

    Ninja - maybe I should get some sort of Christmas present for doing this Its also my birthday in a couple days...

    Attached Files

    #2
    Hello jmflukeiii,
    Thanks for your contribution.

    We do not recommend to modify or edit any system NinjaScript code. I would suggest creating a new OHLChartType cs file for the code instead of editing the @ChatType.cs file.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Can't you guys just do this?

      Or can you help me? Where are the individual chart type files stored?

      Comment


        #4
        Hello jmflukeiii,
        The custom chart style may be stored in the Type folder or in the Indicator folder. You can edit a ChartStyle via the NinjaScirpt editor only if it is located in the Indicator or Strategies folder.

        You may refer to this custom ChartStyle to get more idea regarding it.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Excellent, thank you for the help. Do I need to reference the new chart type I will build from the existing ChartStyles.cs file or can I leave all current Ninja files untouched?

          Thanks again -

          Comment


            #6
            Hello jmflukeiii,
            No need to edit the existing system ChartStyles.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Can I just simple copy and paste what I've got into a new CS file and put it into that folder?

              Comment


                #8
                Hello jmflukeiii,
                We recommend to give a new name (class name) and assign a unique ChartStyleType for any new ChartStyle. Simply copy paste may interfear with the system files.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Right, I change all references to HLC, and replaced the original ChartsType file. I'm testing it now.

                  Comment


                    #10
                    Can I call it (in the line I referenced in my original post) any Custom I want ? I see the MountainChart type used Custom2...

                    Comment


                      #11
                      Hello jmflukeiii,
                      If the MountainChartStyle is installed in your PC then you can use any ChartStyleType except for Custom2.

                      Each ChartStyle should have its unite ChartStyleType.

                      Also please restart NinjaTrader after any modifications.
                      JoydeepNinjaTrader Customer Service

                      Comment


                        #12
                        Here you go, the separate file. Custom0 is its slot, but this can be changed in the line referenced in my first message for anyone that has other custom bar types.
                        Attached Files

                        Comment


                          #13
                          Hello jmflukeiii,
                          Thanks again for your valuable contribution.
                          JoydeepNinjaTrader Customer Service

                          Comment


                            #14
                            So Joydeep, I can also put this in the Indicators folder instead of the type folder? And then access it from the Edit->Indicator menu from inside Ninja?

                            Comment


                              #15
                              Anyone confused on how to use these -

                              put the file into your Documents->NinjaTrader7->bin->custom->Type folder
                              open any indicator and compile it in Ninja
                              restart Ninja

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cre8able, Today, 03:20 PM
                              1 response
                              9 views
                              0 likes
                              Last Post cre8able  
                              Started by fiddich, Today, 05:25 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post fiddich
                              by fiddich
                               
                              Started by gemify, 11-11-2022, 11:52 AM
                              6 responses
                              804 views
                              2 likes
                              Last Post ultls
                              by ultls
                               
                              Started by ScottWalsh, Today, 04:52 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by ScottWalsh, Today, 04:29 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post ScottWalsh  
                              Working...
                              X