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.
                      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 algospoke, Yesterday, 06:40 PM
                          2 responses
                          19 views
                          0 likes
                          Last Post algospoke  
                          Started by ghoul, Today, 06:02 PM
                          3 responses
                          14 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by jeronymite, 04-12-2024, 04:26 PM
                          3 responses
                          45 views
                          0 likes
                          Last Post jeronymite  
                          Started by Barry Milan, Yesterday, 10:35 PM
                          7 responses
                          21 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by AttiM, 02-14-2024, 05:20 PM
                          10 responses
                          181 views
                          0 likes
                          Last Post jeronymite  
                          Working...
                          X