• 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

Custom Resources Dictionary

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

    Custom Resources Dictionary

    Dear Support,

    Is there a list of NT8 custom resources available that we can use? They come real handy in short cutting coding and script writing. An example is:

    Custom.Resource.NinjaScriptDrawingToolExtendedLine , or

    NinjaTrader.Custom.Resource.NinjaScriptIndicatorLo wer, etc.

    Thanks.
    Last edited by aligator; 03-15-2017, 01:11 PM.

    #2
    Hello aligator,

    Thank you for your post.

    There would not be a list of the custom resources available for use. I will forward this request to our Product Management team.

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello aligator,

      Thank you for your post.

      There would not be a list of the custom resources available for use. I will forward this request to our Product Management team.

      Please let me know if you have any questions.
      Thank you PatrickH,

      Could you at least tell me if the following custom resource definition for "RemoveAllDrawingObjects" is correct? If not, what is the correct custom resource definition?

      Code:
        NinjaTrader.Custom.Resource.NinjaScriptDrawingToolRemoveAllDrawingObjects
      Many thanks.

      Comment


        #4
        Hello aligator,

        Thank you for your response.

        What are you attempting to do with the resource?
        Would RemoveDrawObjects() not suffice for your purposes?
        Do you wish to remove objects not draw by the NinjaScript object?

        I look forward to your response.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello aligator,

          Thank you for your response.

          What are you attempting to do with the resource?
          Would RemoveDrawObjects() not suffice for your purposes?
          Do you wish to remove objects not draw by the NinjaScript object?

          I look forward to your response.
          Thank you Patrick,

          I am coding a few main toolbar buttons for 1-click action. For example, the following icon from drawing tools is used for draw text:

          Code:
          			if (!isToolBarButtonAdded && showText)
          				{
          				btnText = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawText, };

          I am trying to add a button to remove all user drawn objects with the following code change, replace "Text" with the "RemoveAllDrawObjects." However, it will not work and I looking for the correct library definition for "RemoveAllDrawObjects" Icon.

          Thanks.

          Comment


            #6
            Hello aligator,

            Regarding the resource name, as this is used internally and not documented we have put in a request for further documentation on internal resources that are used. SFT-2035

            For the Text or tooltip, you could type in "Remove all Drawing Objects" for the time being.

            Code:
            ToolTip = "Remove all Drawing Objects"
            For the icon, because NinjaTrader uses styles to delegate icons you can use the following syntax for a buttons Content to achieve an Icon:

            Code:
            Content = Icons.DrawRemoveDraw
            You should be able to type Icons. to access the drop down intelleprompt listing all useable icons.

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello aligator,

              For the icon, because NinjaTrader uses styles to delegate icons you can use the following syntax for a buttons Content to achieve an Icon:

              Code:
              Content = Icons.DrawRemoveDraw
              You should be able to type Icons. to access the drop down intelleprompt listing all useable icons.

              Please let me know if I may be of further assistance.
              Thank you so much Jesse,

              The above Icon code to Remove Draw worked wonderful. It would be nice when more custom resources are documented.

              Meanwhile, I would appreciate if you can also provide the correct Icon definition for the 3 icons:

              Stay in Draw Mode ------- (i.e., Content = Icon.StayInDrawMode)

              Bar Width + ------- (i.e., Content = Icon.BarWidthPlus)

              Bar Width - ------- (i.e., Content = Icon.BarWidthMinus)

              Thank you.

              Comment


                #8
                Hello,

                Thank you for the reply.

                You will be able to use the NinjaScript editor and our previous example to locate these items if they are available.

                You would need to type into the NinajScript editor:
                NinjaTrader.Gui.Tools.Icons
                after typing this press Period and a menu will open. In the menu are all possible options for icons that can be used out of this class. I am unsure of other areas in the platform that icons may be stored, this is the only one I am aware of.

                I do not see an icon for stay in draw mode specifically but do see the plus and minus for bar width.

                I have composed a short demonstration on how to utilize the Intelleprompt to locate items in NinjaScript below:

                https://puu.sh/v9lUF/511554dbf1.png


                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello,


                  I have composed a short demonstration on how to utilize the Intelleprompt to locate items in NinjaScript below:

                  https://puu.sh/v9lUF/511554dbf1.png


                  Please let me know if I may be of further assistance.
                  Thanks a bunch again Jesse,

                  The Intellepropmt is a least know tool source to non-programmers, I can find answers to most of my questions there.

                  Teach a man how to fish ... Thanks.

                  Cheers!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by aslane, Today, 10:53 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post aslane
                  by aslane
                   
                  Started by bouncetherubble, Yesterday, 08:42 PM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_ChrisL  
                  Started by bortz, Yesterday, 08:18 AM
                  5 responses
                  35 views
                  0 likes
                  Last Post bortz
                  by bortz
                   
                  Started by GARZONJ, Yesterday, 09:02 PM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_ChrisL  
                  Started by siroya, Today, 06:32 AM
                  4 responses
                  20 views
                  0 likes
                  Last Post NinjaTrader_ChrisL  
                  Working...
                  X