Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding a bottom to the Dom for my strategy

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

    adding a bottom to the Dom for my strategy

    hi I created a custom strategy and I'm trying to add a button to the Dom that can control my strategy is it possible and how can I achieve this? I attached a picture as an example
    Attached Files

    #2
    Hello fgs092790,

    Thank you for your post.

    Do you mean a button on the Chart Trader, or the SuperDOM? Your screenshot there is of Chart Trader.

    What do you mean by "control my strategy"? Enabling and disabling the strategy?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Yes, the Chart Trader.

      When I say control my strategy, I mean 1 button to enable and disable the strategy and another button for when I'm in a trade and I want to go flat.

      Comment


        #4
        Hello fgs092790,

        Thank you for your reply.

        It would not be possible to enable a strategy from NinjaScript, however, it is possible to terminate the strategy or submit an order.

        This example from our help guide demonstrates adding buttons to the chart trader:



        Close Strategy:



        This script from our help guide demonstrates adding buttons on the chart window itself to submit orders:



        Please let us know if we may be of further assistance to you.

        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

        Comment


          #5
          that's was I was looking for thanks so much for your help and quick response.

          Comment


            #6
            hi i downloaded the indicator that adds the buttons to the chart, but im trying to figure out how to make work within my strategy all i want is that when i press one of the buttons to make my strategy go flat if is a position.
            Attached Files

            Comment


              #7
              Hello fgs092790,

              Thank you for your reply.

              I'm not able to review your logic in your strategy as you have exported it as a compiled assembly, meaning the code is not accessible. I'm happy to take a look if you reexport the script. Do not check the box to export as a compiled assembly this time and I'll be able to take a look.

              Thanks in advance; I look forward to assisting you further.

              Comment


                #8
                thanks so much for helping
                Attached Files

                Comment


                  #9
                  Hello fgs092790,

                  Thank you for your reply.

                  I'm not seeing that you've incorporated any of the code from the example indicator in your strategy. You would want to incorporate the code for the buttons into your strategy in the same places they are in the example. Then, in OnBarUpdate, look for the bool that the button sets and if it's true, submit both a long and a short market order to close the position.

                  This will require some skill at manual coding with NinjaScript. If you like, you can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

                  Please let me know if I may be of further assistance.​

                  Comment


                    #10
                    yes please.

                    Comment


                      #11

                      Hello,

                      Thank you for your post.

                      You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
                      You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

                      The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

                      Let me know if I may be of further assistance.
                      Thomas C.NinjaTrader Customer Service

                      Comment


                        #12
                        hi thomas thanks in advance for your help, hi i been trying to figure out how to enter a trade for example if (last trade = long && last trade == loss then EnterShort) or if (last trade = short && last trade == loss then EnterLong)
                        any ideas how to do this?​

                        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
                        69 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