• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.
    Joydeep M.NinjaTrader 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.
        http://ninjatrader.com/support/forum...atid=6&lpage=1
        Joydeep M.NinjaTrader 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.
            Joydeep M.NinjaTrader 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.
                Joydeep M.NinjaTrader 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.
                      Joydeep M.NinjaTrader 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.
                          Joydeep M.NinjaTrader 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 priceisking, Today, 12:51 PM
                              1 response
                              15 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by chartish, Today, 10:33 AM
                              3 responses
                              20 views
                              0 likes
                              Last Post chartish  
                              Started by casabella, Today, 11:51 AM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by Johnny, Today, 11:42 AM
                              1 response
                              15 views
                              0 likes
                              Last Post NinjaTrader_Jermaine  
                              Started by habibalex, Today, 09:03 AM
                              2 responses
                              14 views
                              0 likes
                              Last Post sledge
                              by sledge
                               
                              Working...
                              X