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:

        https://github.com/MrRoundRobin/telegram.bot

        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 NichUK, Today, 10:51 AM
              0 responses
              7 views
              0 likes
              Last Post NichUK
              by NichUK
               
              Started by caseymour127, Today, 09:46 AM
              2 responses
              20 views
              0 likes
              Last Post caseymour127  
              Started by Apo84, Today, 09:37 AM
              1 response
              20 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by skblack1911, Today, 09:41 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_RyanS  
              Started by bedaine, Today, 09:40 AM
              3 responses
              15 views
              0 likes
              Last Post NinjaTrader_RyanS  
              Working...
              X