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

Icon are not showing on Drawing Tool Tile

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

    Icon are not showing on Drawing Tool Tile

    Hello,

    I am developing some custom Drawing tools, using custom icons, they are showing just right at the Drawing tool menu, but when adding them to the Drawing Tool Tile, no icon appears and it just show as empty (please look at the attached image)

    Details
    I followed this to add the custom icons :https://ninjatrader.com/support/help...r_an_addon.htm
    I tried with images .jpg and .png with the same result

    Regards,
    Ale
    Attached Files

    #2
    Hello alejandro888,

    Are you saying that you have made a copy of the drawing tool tile indicator and when adding your custom drawing tool to that the icon is not showing up?

    How are you creating the icon in your drawing object, are you doing it in a similar way to the existing tools or using one of the ways shown in the help guide? The link you provided didn't have a icon sample, did you mean this link? https://ninjatrader.com/support/help...stom_icons.htm



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      I made a custom drawing tool that has an icon from un imagen.jpg, when I tried to add a new drawing tool into the Drawing tool Tile, it is added, but is not showing any icon from there, the icon appears only in the Drawing tool menu, but it doesn't appear in the Drawing tool Tile as in the image I attached before.


      For testing proposed I created a small image.jpg on Paint and followed the steps from the same link you provided for the case Using an Image as an Icon

      Regards,
      Ale
      Last edited by alejandro888; 08-30-2021, 12:02 PM.

      Comment


        #4
        Hello alejandro888,

        Thank you for the reply.

        I understand the problem from the description that you provided in post 1, the items I would need to know are the items that I had mentioned in post 2.

        The link you provided does not go to an example for creating icon, it was not valid. Did you follow the link I added to the Icon examples? Are you using code like that?

        It sounds like the icon image is working if it shows up in other areas, it may be how you coded the file however I couldn't say. The drawing tool tile indicator also does not automatically add custom icons so it may be how you are adding it in that edit.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Jesse, yes the code is using the same as Icon Example

          The only difference is it is being used (added) within the class for the drawing tool

          where I added the image path to OnStateChange()

          Code:
          if (State == State.Configure)
          {
          iconBitmapImage.BeginInit();
          iconBitmapImage.UriSource = new Uri(@"C:\Users\ale\Google Drive\trading\Dev\dev.jpg");
          iconBitmapImage.EndInit();
          }
          and updated the Override Icon as one in the example

          Regards,
          Ale

          Comment


            #6
            Hello alejandro888,

            Thank you for the reply.

            And how are you modifying the drawing tool tile to read the icon? If you did not create an instance of the drawing object before trying to read the icon then you won't hit OnStateChange to create the icon.


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              I am not modifying the drawing tool tile, I just want to add the custom drawing tool like any other drawing tool,

              So I go Indicators -> Drawing Tool Tile -> check the Drawing tools I want to include in the tile (as the custom I made)

              Click image for larger version  Name:	tile.PNG Views:	0 Size:	63.6 KB ID:	1169576

              So the "Dev RRS 1" is added into the Tile and I am able to use it, but not showing any icon, just an empty spot​

              Comment


                #8
                Hello alejandro888,

                Thank you for the clarification.

                Do you still see the problem happen if you use the Path icon example instead of the image?

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Hi Jesse,

                  ̶I̶ ̶i̶f̶ ̶d̶o̶ ̶t̶h̶a̶t̶ ̶I̶ ̶g̶e̶t̶ ̶"̶u̶n̶h̶a̶n̶d̶l̶e̶d̶ ̶e̶x̶c̶e̶p̶t̶i̶o̶n̶ ̶N̶o̶ ̶i̶n̶f̶o̶r̶m̶a̶t̶i̶o̶n̶ ̶w̶a̶s̶ ̶f̶o̶u̶n̶d̶ ̶a̶b̶o̶u̶t̶ ̶t̶h̶i̶s̶ ̶p̶i̶x̶e̶l̶ ̶f̶o̶r̶m̶a̶t̶"̶,̶ ̶I̶ ̶b̶e̶l̶i̶e̶v̶e̶ ̶i̶t̶ ̶i̶s̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶t̶h̶e̶ ̶i̶c̶o̶n̶.̶j̶p̶g̶ ̶d̶o̶e̶s̶n̶'̶t̶ ̶e̶x̶i̶s̶t̶ ̶o̶n̶ ̶m̶y̶ ̶p̶c̶ ̶a̶n̶d̶ ̶I̶ ̶d̶o̶n̶'̶t̶ ̶k̶n̶o̶w̶ ̶w̶h̶e̶r̶e̶ ̶i̶s̶ ̶t̶h̶e̶ ̶a̶c̶t̶u̶a̶l̶ ̶p̶a̶t̶h̶ ̶f̶o̶r̶ ̶N̶i̶n̶j̶a̶T̶r̶a̶d̶e̶r̶.̶C̶o̶r̶e̶.̶G̶l̶o̶b̶a̶l̶s̶. ̶I̶n̶s̶t̶a̶l̶l̶D̶i̶r̶ ̶t̶o̶ ̶i̶n̶c̶l̶u̶d̶e̶ ̶a̶ ̶n̶e̶w̶ ̶i̶m̶a̶g̶e̶


                  I did the change to the same Path icon using in the example instead of one I was using, and still get the same result, it shows an empty slot in the Drawing tool Tile


                  Regards
                  Last edited by alejandro888; 08-30-2021, 04:05 PM.

                  Comment


                    #10
                    Hello alejandro888,

                    I tried using the path example from the help guide in a new empty drawing tool and then tried the tile indicator however I see it working. I would suggest to make a small test script and include the icon how you have coded it so we can better understand what the problem may be.

                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Hello Jesse,

                      I tried following the steps as you did. I created a new empty drawing tool and included the code from the help guide.

                      My results: icon I used for for new empty new drawing tool is being displayed at the drawing tool menu

                      Click image for larger version  Name:	drawingtool.png Views:	0 Size:	101.6 KB ID:	1169760


                      Adding the IconTest (empty drawing tool) to a Drawing tool tile

                      Click image for larger version  Name:	TileIndicator.png Views:	0 Size:	54.7 KB ID:	1169761


                      The Drawing tool tile on the chart:
                      Click image for larger version  Name:	TileOnChart.png Views:	0 Size:	4.6 KB ID:	1169762

                      I am getting the same results as before where the new drawing tool is added to the tile indicator with no icon, I am attaching the files I am using for the dev.jpg and the empty drawing tool icontest.cs, and the path for the icon is in fresh installation of NinjaTrader 8 at "C:\Program Files (x86)\NinjaTrader 8"

                      I added some comments at the return of the object Icon

                      Regards,
                      Ale
                      Attached Files
                      Last edited by alejandro888; 08-31-2021, 07:55 PM.

                      Comment


                        #12
                        Hello alejandro888,

                        I tried the sample however this works on my end. I had to edit the sample to use the Path because the icon file was not included. I do see the Path version of the icon working. If you can upload the image you are using I can try that as well.

                        I look forward to being of further assistance.
                        JesseNinjaTrader Customer Service

                        Comment


                          #13

                          Hi Jesse,


                          I attached the icon I am using:​​​Click image for larger version

Name:	Icon.jpg
Views:	186
Size:	1.2 KB
ID:	1169878

                          I was placing the icon NinjaTrader default installation folder at "C:\Program Files (x86)\NinjaTrader 8"

                          Regards,
                          Ale

                          Comment


                            #14
                            Hello alejandro888,

                            I am still not seeing a problem with this file. have you treid placing the file in the user folder or anywhere location? potentially it relates to the location however that should not matter if you are testing using the Path example. I would suggest for the time being to test using the Path example so we can confirm the file has nothing to do with the problem.

                            JesseNinjaTrader Customer Service

                            Comment


                              #15
                              Hi Jesse,
                              I found something that works for me, initializing a new instance of the BitmapImage supplying the Uri on the constructor, instead of late at OnStateChange()
                              Click image for larger version

Name:	Capture.PNG
Views:	180
Size:	3.1 KB
ID:	1170218

                              Idk why it was not working straightforward as the examples on the documentation

                              Regards,
                              Ale

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ScottWalsh, Today, 06:52 PM
                              3 responses
                              17 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              17 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post cre8able  
                              Started by Haiasi, Today, 06:53 PM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by ScottW, Today, 06:09 PM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X