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

Drawing Icon Images

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

    Drawing Icon Images

    Does anyone know where the drawing icon images are stored for Ninja? For example the icon image for the fibonacci retracement or horizontal line etc? I am wanting to use them for a toolbar I am creating.

    #2
    Hello jhowinvest,
    Please refer to this indicator which further demonstrates how to retrieve the icon any drawing object.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thank you and I have looked at this indicator as an example but I am stuck on getting the image. Here is an example code snippet where the ????? is what I am trying to figure out so that the fib extension icon appears.

      btnFibext = new System.Windows.Forms.ToolStripButton("btnFibext");
      btnFibext.Font = boldFont ;
      btnFibext.ForeColor = Color.Green;
      btnFibext.BackColor= Color.Gainsboro;
      btnFibext.Alignment = ToolStripItemAlignment.Right;
      btnFibext.Text = "FibExt";
      btnFibext.DisplayStyle = ToolStripItemDisplayStyle.Image;
      btnFibext.Image = ???????.Image;
      btnFibext.ToolTipText = "Fibonacci Extension";

      Thank you for your help.

      Comment


        #4
        Hello jhowinvest,
        Unfortunately this is beyond what we could support however you may check into line 133 in the code which displays how to retrieve the icon.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Okay. Thanks for your help but I will have to stick with text for the buttons because I can't figure it out.

          Comment


            #6
            Okay....I got it to work with some major "work arounds". The only thing I need now is the click event for "remove all draw objects". Can you provide that please? Everything is functional except the remove draw objects. I got the others to work by saving the images for the icons and using the SendKeys.Send for the keyboard shortcuts of the drawings . Thanks

            Comment


              #7
              Hello jhowinvest,
              Unfortunately click events, buttons are not officially supported by us.

              I will however leave the thread open for any of our forum members who can share their valuable inputs.
              JoydeepNinjaTrader Customer Service

              Comment


                #8
                I figured it out....I just assigned a hot key sequence to it and used the SendKeys.Send to get it done. For anyone who is interested here is the code with Ctrl+J being the assigned hot key to delete all manual drawings:

                private void btnDelete_Click(object sender, EventArgs e)
                {
                SendKeys.Send("^{j}");
                Attached Files

                Comment


                  #9
                  Originally posted by jhowinvest View Post
                  I figured it out....I just assigned a hot key sequence to it and used the SendKeys.Send to get it done. For anyone who is interested here is the code with Ctrl+J being the assigned hot key to delete all manual drawings:

                  private void btnDelete_Click(object sender, EventArgs e)
                  {
                  SendKeys.Send("^{j}");
                  Did you try simply calling the NT method to remove all draw objects, RemoveDrawObjects(), as the action for your click event?

                  Comment


                    #10
                    Yes I did but I may have made a mistake when I put the code in. I thought that RemoveDrawObjects() would not work to delete manually drawn objects. If so then this would have made it easier. I am a novice and tend to make things more difficult than they should be.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post Javierw.ok  
                    Started by timmbbo, Today, 08:59 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post bltdavid  
                    Started by alifarahani, Today, 09:40 AM
                    6 responses
                    40 views
                    0 likes
                    Last Post alifarahani  
                    Started by Waxavi, Today, 02:10 AM
                    1 response
                    18 views
                    0 likes
                    Last Post NinjaTrader_LuisH  
                    Started by Kaledus, Today, 01:29 PM
                    5 responses
                    15 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Working...
                    X