• 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

Removal of Bar type indicator

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

    #16
    Originally posted by NinjaTrader_AdamP View Post
    kalalex,

    Bar types would be in MY Documents / NinjaTrader 7 / bin / custom / type

    If you delete the file, then you can compile any single indicator and it will be gone.
    is there a way to change the custom slot a bar type is currently holding

    Comment


      #17
      Hello,

      Thank you for your response.

      This is possible, but unsupported. You would need to change the "PeriodType.Custom#". Slots available are Custom 0-9 and Final 0-4

      Please let me know if I can be of any further assistance.

      Zach S.NinjaTrader Customer Service

      Comment


        #18
        I suspect a bartype I am trying to remove may be part of a Ninjatrader script assembly. Does anyone know from which proprietary system _Harmonic Bars are from? I have gone into ...bin\custom\type and the bar type is not in there.So a simple deletion from there won't work. Btw how does one change the "PeriodType.Custom#". Slots of a bar type?
        Thank you.

        Comment


          #19
          If you have a bar type installed and it is not in a C# file in one of your subfolders, this means that it is in one of your .dll files. In order to safely uninstall these files, you must have a NinjaScript editor open. You can open an editor by selecting Tools -> Edit NinjaScript -> Indicator -> select any indicator -> Open . You can then right-click in your editor window and select "references", select a .dll reference, and press "delete" to delete the reference. This will only delete Ninja's way of looking up this .dll , not the file in your filesystem. The file in your filesystem is located in your (My) Documents\NinjaTrader 7\bin\Custom folder. You can move these files to your desktop to safely hide them from NinjaTrader without deleting them completely. After deleting a reference and moving a .dll file to your desktop, you should then OK out of your references menu, and press F5 in NinjaTrader. Any files that come up as having errors should be located in your filesystem and moved to your desktop. Finally, restart NinjaTrader after removing a single .dll file completely, to see if it has removed your custom bar type. You can repeat this process until you have discovered which library has your custom bar type.

          Adding new BarsPeriod types is an undocumented feature in NinjaTrader 7, and as such we can only provide limited support. However, if you are able to use existing classes in the Types folder to create your own BarsPeriod type, and compile it, it will show up as BarsPeriod.<class> . As you are aware, there is a hard coded number of available slots in NinjaTrader 7. This can not be changed. To free up slots you must uninstall existing BarsPeriod types and delete your NinjaTrader.Custom.dll file, forcing Ninja to recompile it.

          Please let us know if there are any other ways we can help.
          Jessica P.NinjaTrader Customer Service

          Comment


            #20
            Originally posted by NinjaTrader_JessicaP View Post
            If you have a bar type installed and it is not in a C# file in one of your subfolders, this means that it is in one of your .dll files. In order to safely uninstall these files, you must have a NinjaScript editor open. You can open an editor by selecting Tools -> Edit NinjaScript -> Indicator -> select any indicator -> Open . You can then right-click in your editor window and select "references", select a .dll reference, and press "delete" to delete the reference. This will only delete Ninja's way of looking up this .dll , not the file in your filesystem. The file in your filesystem is located in your (My) Documents\NinjaTrader 7\bin\Custom folder. You can move these files to your desktop to safely hide them from NinjaTrader without deleting them completely. After deleting a reference and moving a .dll file to your desktop, you should then OK out of your references menu, and press F5 in NinjaTrader. Any files that come up as having errors should be located in your filesystem and moved to your desktop. Finally, restart NinjaTrader after removing a single .dll file completely, to see if it has removed your custom bar type. You can repeat this process until you have discovered which library has your custom bar type.

            Adding new BarsPeriod types is an undocumented feature in NinjaTrader 7, and as such we can only provide limited support. However, if you are able to use existing classes in the Types folder to create your own BarsPeriod type, and compile it, it will show up as BarsPeriod.<class> . As you are aware, there is a hard coded number of available slots in NinjaTrader 7. This can not be changed. To free up slots you must uninstall existing BarsPeriod types and delete your NinjaTrader.Custom.dll file, forcing Ninja to recompile it.

            Please let us know if there are any other ways we can help.
            Many thanks for your prompt reply Jess.I was just wondering if one can change the slot # of a bar type to an available and unused one by editing the it's code directly? Thanks!

            Comment


              #21
              This is an undocumented feature and we can only provide limited support. That said, in my experience these IDs are assigned first-come-first-serve.

              This code will add every bars period type as a separate data series, whose Bars.BarsType.DisplayName can be printed out :

              Code:
              Add(PeriodType.Custom0, 1);
              Add(PeriodType.Custom1, 1);
              Add(PeriodType.Custom2, 1);
              Add(PeriodType.Custom3, 1);
              Add(PeriodType.Custom4, 1);
              Add(PeriodType.Custom5, 1);
              Add(PeriodType.Custom6, 1);
              Add(PeriodType.Custom7, 1);
              Add(PeriodType.Custom8, 1);
              Add(PeriodType.Custom9, 1);
              //.Final
              Add(PeriodType.Final0, 1);
              Add(PeriodType.Final1, 1);
              Add(PeriodType.Final2, 1);
              Add(PeriodType.Final3, 1);
              Add(PeriodType.Final4, 1);
              You can then include this in your OnBarUpdate :

              Code:
              if (BarsInProgress > 0)
              {
                  Print("Bar ID " + BarsInProgress + " is " + Bars.BarsType.DisplayName);
              }
              If you repeatedly remove bars types installed on your system and recompile, you should be able to specify an ID through this method. This method has not been tested. The above code however has, and should provide you with enough information to discover a method to change IDs should the method I recommended not work.
              Jessica P.NinjaTrader Customer Service

              Comment


                #22
                Thank you very much for your help Jessica!

                Comment


                  #23
                  Hi, I need some help regarding 2 custom indicators.
                  the problem I have is when (A) is working, the other (B) won't show up under type and vise versa. In order to get it to work, I would have to reload the script on B and reboot and it will show up but then the A indicator would be gone. How can I use both indicators at the same time? Thanks

                  Comment


                    #24
                    Originally posted by KENSANLB View Post
                    Hi, I need some help regarding 2 custom indicators.
                    the problem I have is when (A) is working, the other (B) won't show up under type and vise versa. In order to get it to work, I would have to reload the script on B and reboot and it will show up but then the A indicator would be gone. How can I use both indicators at the same time? Thanks
                    there is a high chance of A and B use the same bar type, so you have to change A or B to use other type that has not been used. You select between Custom 0-9 and Final 0-4.
                    1) to know what bar type already been used, load this indicator, bartypesinfo, run it (reload ninja script) and look at bar type used on ninja output
                    2) pick bar type not on the list and change the duplicate bar type to the new one
                    3) recompile, reopen ninja to see both bar type
                    Attached Files

                    Comment


                      #25
                      Hello KENSANLB,

                      Is your script an Indicator shown in the Indicators window or is the script a BarType shown in the Type drop-down of the Data Series window?
                      (If the script is an indicator the issue would not be a slot issue and we should move your inquiry to a new thread)

                      Also, below is a link to another NinjaTrader 7 indicator that prints the bar type names and slot numbers.
                      https://ninjatrader.com/support/foru...033#post712033
                      Last edited by NinjaTrader_ChelseaB; 12-30-2018, 10:43 PM.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #26
                        Thanks Chelsea, it's actually under data series/period/type. I ended up removing it from the file location and it did the trick. Thank you.
                        I still have 2 indicators that looks like they use the same slot so does it mean that I need to change the slot? in order for them both to exist at the same time? (under data series/period/type)

                        Comment


                          #27
                          Hello KENSANLB,

                          I want to clarify that this script is a BarType script and is not an indicator.
                          This language may help to prevent confusion.

                          Yes, if two BarType scripts are using the same PeriodType only one will show in the Type drop-down in the Data Series window. One of the scripts will need to be modified to change the PeriodType.

                          Below is a link to a forum post where this is discussed.
                          https://ninjatrader.com/support/foru...056#post630056
                          Chelsea B.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Botan626, Today, 04:43 AM
                          0 responses
                          2 views
                          0 likes
                          Last Post Botan626  
                          Started by xsgex, Yesterday, 09:46 PM
                          0 responses
                          3 views
                          0 likes
                          Last Post xsgex
                          by xsgex
                           
                          Started by Steve L, Yesterday, 09:36 PM
                          0 responses
                          4 views
                          0 likes
                          Last Post Steve L
                          by Steve L
                           
                          Started by krugman25, Yesterday, 09:34 PM
                          0 responses
                          4 views
                          0 likes
                          Last Post krugman25  
                          Started by indy73, Yesterday, 04:42 PM
                          0 responses
                          15 views
                          0 likes
                          Last Post indy73
                          by indy73
                           
                          Working...
                          X