Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Share Position to Twitter Feed when filled

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

    Share Position to Twitter Feed when filled

    I am writing an auto strategy and it is working well. Now I want to have all entries and exits posted to Twitter. I have only found how to do posts with alerts, not on my positions. What would be the proper way to code this?

    #2
    There should be a Share to Twitter option under the action tab in Strategy Builder, I assume you can add that with your orders via the Builder or code editing.

    Comment


      #3
      Hello casabella,

      Thanks for your post.

      As member Tradarr advises you can use the Share service to post to twitter.

      You would first need to set up the share service with the platform (if you haven't already): https://ninjatrader.com/support/help...al_section.htm

      If you are using the Strategy Builder, in the "do the following" section of any set, you can select Misc>Share and set a message and/or a screenshot and select the share service to send to.

      If you are coding directly in Ninjascript, then you can reference the following method: https://ninjatrader.com/support/help...-us/?share.htm

      Comment


        #4
        Thanks, I see a way to post-market position however I want to post something like the following: Shorted 2 contracts at $68.45
        Or Bought to Cover 1 Contract at $68.01 or position stopped out

        What would be the string for that kind of post? Posting the actions being taken by NT8 as they happen to match the strategy as it posts to the chart.

        Comment


          #5
          Hello casabella,

          Thanks for your reply.

          Can you clarify if you are using the strategy builder or Ninjascript created strategy?

          Comment


            #6
            Strategy Builder

            Comment


              #7
              Hello casabella,

              Thanks for your reply.

              In the strategy builder, you would be limited in what information is available.

              In the "do the following" section of a set if you click on Misc>Share you can construct a message by clicking the word "set" in the message field. This will then allow you to select any data available to the strategy builder. For example in the "strategy" folder you can select position size, market position, realized and unrealizedPNL average position price, etc. You can also "add" strings to build the message of interest. This is something you will have to test and explore. The message would only be sent when the condition(s) of that set are true.





              Comment


                #8
                The code is now unlocked so I can use any C# that will work. Can you tell me how to accomplish the post I would like?

                Comment


                  #9
                  Hello casabella,

                  Thanks for your reply.

                  You can use the OnExecutionUpdate() to obtain information about the order when the order fills (entry price) and when the stop loss or profit target are hit (exit price). I recommend starting simple and printing the execution name so that you can see when this is called as well as the names used.

                  Reference: https://ninjatrader.com/support/help...tionupdate.htm

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  50 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  126 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  68 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X