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

Create custom share service

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

    Create custom share service

    Hi.

    I'm trying to create new custom share service for Telegram. I use NinjaTrader Editor -> New share Service, complete wizard. In Options -> Share Services new share service is available. I click Add button, then OK and get this Error:
    ...share service could not be saved. This share service has not been properly configured. Connect to the service before pressing Ok or Apply.
    What i missed?

    #2
    Hello wr41th,

    Thank you for the post, and welcome to the NinjaTrader forum.

    The IsConfigured property will tell if the share service is properly configured. You can see the Mail share service script set this in State.SetDefaults. The other share service scripts are open source, so they would be a good reference for creating a custom share service.

    Please let me know if I can assist further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chris.
      I set this property to true and share service allowed to click Ok.

      I used Twitter share service as base for my Telegram service (cause it use HttpClient, not SmtpClient). But it doesn't work. I get this into log -
      13.11.2018 18:30:19 NinjaScript There was an error while sharing from the Share service Telegram: "An error occurred while sending the request."
      Can you check it out in attach?
      Attached Files

      Comment


        #4
        Hello wr41th,

        Thanks for the reply.

        Support is limited to the share service only, so I can not look into the Telegram API much. Were you able to make a successful post request from a standalone C# application yet?

        I was able to find this public repository of a C# Telegram client:

        .NET Client for Telegram Bot API. Contribute to MrRoundRobin/Telegram.Bot development by creating an account on GitHub.


        I look forward to assisting further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          No, i didn't try it as standalone c# app. I don't have VS. Just NinjaScriptEditor. Url through Chrome works correctly (message sent), but it doesn't work through NT Share service.

          Thank you Chris, i will continue troubleshooting by myself.

          Comment


            #6
            Originally posted by wr41th View Post
            No, i didn't try it as standalone c# app. I don't have VS. Just NinjaScriptEditor. Url through Chrome works correctly (message sent), but it doesn't work through NT Share service.

            Thank you Chris, i will continue troubleshooting by myself.
            HI wr41th. Did you get it fixed in the end ? If so please can you share the code?

            Comment


              #7
              Hi guys, is this what you are looking for?

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by TraderBCL, Today, 04:38 AM
              1 response
              4 views
              0 likes
              Last Post bltdavid  
              Started by martin70, 03-24-2023, 04:58 AM
              14 responses
              105 views
              0 likes
              Last Post martin70  
              Started by Radano, 06-10-2021, 01:40 AM
              19 responses
              606 views
              0 likes
              Last Post Radano
              by Radano
               
              Started by KenneGaray, Today, 03:48 AM
              0 responses
              4 views
              0 likes
              Last Post KenneGaray  
              Started by thanajo, 05-04-2021, 02:11 AM
              4 responses
              470 views
              0 likes
              Last Post tradingnasdaqprueba  
              Working...
              X