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

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

      Paul H.NinjaTrader Customer Service

      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?
          Paul H.NinjaTrader Customer Service

          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.





              Paul H.NinjaTrader Customer Service

              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

                  Paul H.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by inanazsocial, Today, 01:15 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post inanazsocial  
                  Started by trilliantrader, 04-18-2024, 08:16 AM
                  5 responses
                  22 views
                  0 likes
                  Last Post trilliantrader  
                  Started by Davidtowleii, Today, 12:15 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Davidtowleii  
                  Started by guillembm, Yesterday, 11:25 AM
                  2 responses
                  9 views
                  0 likes
                  Last Post guillembm  
                  Started by junkone, 04-21-2024, 07:17 AM
                  9 responses
                  70 views
                  0 likes
                  Last Post jeronymite  
                  Working...
                  X