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

Add button to Share Service settings

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

    Add button to Share Service settings

    Hi,


    The "Email" share service offers a button for sending a test message (see attached image). From the example code I cannot see how to add such a button to a custom share service. How can I add such a button?



    Regards,
    Attached Files

    #2
    Hello Halmix,

    You can add a button to the UserControlCollection or you can manipulate the WPF elements of the chart.

    Below is a public link to the help guide on UserControlCollection.


    And a link to a post with examples of adding buttons to the WPF elements on the chart.
    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


    To send an email from a script use SendMail() in the .Click handler for the button. Below is a public link to the help guide on SendMail().


    Or call Share().


    The SMTP settings will need to be setup first.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the links. But my problem is not the creation of the button itself, but how to add it to the "Share service" settings view as shown on my initial post's screenshot?

      Comment


        #4
        Hello Halmix,

        Below is a link to a video that demonstrates setting up gmail as an smtp server.
        Link to common SMTP setups: http://ninjatrader.com/support/forum/showthread.php?t=45339 This video demonstrates how to setup gmail using an application specific password as a share service in NinjaTrader. This can be used to trigger emails from alerts and can be used to send text messages. Below is a link to common sms to email address formats. http://www.emailtextmessages.com/


        And a link to a thread with common smtp server settings.
        Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I think we are talking about different things . We can add text, number, date and other fields like this:
          Code:
          #region Properties
          [NinjaScriptProperty]
          [Range(1, int.MaxValue)]
          [Display(Name="RetryCount", Description="The number of retries.", Order=2, GroupName="Parameters")]
          public int RetryCount
          { get; set; }
           #endregion

          I am looking for a way to add a button, e.g. something like this:
          Code:
           [NinjaScriptProperty]
          [Display(Name="MyButton", Description="Click me.", Order=2, GroupName="Parameters")]
          public Event ButtonClicked
          { get; set; }
          #endregion

          Comment


            #6
            Hello Halmix,

            I'm not understanding.

            Are you trying to add a share service to 'Tools > Options > General > Share services' so that you can send emails from a script?

            Do you need help setting up a share service?

            Do you need help adding a button to the chart and sending an email when the button is clicked.

            A button cannot be a property..
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              In my initial post there is a screen shot where a button is marked with a red stroke. I want to add such a button to my own Share Service. When this custom button is clicked then my own test code should be executed.

              Comment


                #8
                Hello Halmix,

                I understand, you are trying to create a custom share service script.

                Adding buttons in a property grid is not officially supported by NinjaTrader Support to do.

                I am happy to submit a feature request on you behalf for the NinjaTrader Development consider creating a supported and documented way of adding buttons to the property grid in the Share Services window from a custom Share script if you would like.

                This thread will remain open for any community members that would like to assist.

                You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.

                That said, it might be possible to make a custom PropertyEditor in an Addon file to achieve this.

                Below is a link to a forum post where NinjaTrader_Jesse has posted undocumented and unsupported code that demonstrates.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks a lot for your help . I hope that this feature will be added with a future update.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by TraderBCL, Today, 04:38 AM
                  2 responses
                  16 views
                  0 likes
                  Last Post TraderBCL  
                  Started by martin70, 03-24-2023, 04:58 AM
                  14 responses
                  106 views
                  0 likes
                  Last Post martin70  
                  Started by Radano, 06-10-2021, 01:40 AM
                  19 responses
                  609 views
                  0 likes
                  Last Post Radano
                  by Radano
                   
                  Started by KenneGaray, Today, 03:48 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post KenneGaray  
                  Started by thanajo, 05-04-2021, 02:11 AM
                  4 responses
                  471 views
                  0 likes
                  Last Post tradingnasdaqprueba  
                  Working...
                  X