Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatically attach a limit order to Indicator

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

    Automatically attach a limit order to Indicator

    Hello,

    I'd like to set up (an indicator or strategy, I don't grasp the difference) to be able to place a limit order that would be automatically attached to an indicator. Is there any way to place an order in a "one click" workflow to achieve that? Would it be possible to do it in the strategy builder?

    Use case would be to click "buy" chart trader default button and this would place a limit order attached to an indicator. (Mid Bollinger Band for example). Ideally I'd like this first order to trigger a TP and SL orders that would also be linked to an indicator (Upper and Lower Bollinger Bands for example).

    Thanks for your insight

    #2
    Hello gr1ndb0t,

    Thank you for your post.

    You can attach orders to indicators already via the Chart Trader and SuperDOM. This HG page goes over how to do so:



    You could also create with custom-coded logic that does this. Your script would need to call the indicator value on each tick, then change the price of the order to the price of the indicator value.

    If you wanted to do this via a button click, you would need to create a script which creates its own custom buttons to submit a trade. A strategy script cannot modify or manage orders submitted via the Chart Trader order buttons. We have an existing sample script that demonstrates creating custom buttons in a strategy:



    To do this in an indicator you would need to place orders using the Addon account class.



    Please let us know if you have any further questions.​

    Comment


      #3
      Thank you, if I want to skip creating a UI and buttons logic, can I set a keyboard shortcut instead to trigger initial order or do I have to build a logic and call the button by a keyboard shortcut after wards? (Hope it makes sense, I'm super noob at coding)

      Comment


        #4
        Hello gr1ndb0t,

        If you wanted to do a keyboard shortcut instead of a button, this would also require custom coding as what you're looking for goes beyond the existing Order Entry hot key functionality.

        There are some links to examples of scripts that detecting key presses in C# in the following post:



        The other option is the button, as described in my previous post.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services.

        You can search our extensive library 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:

        https://ninjatraderecosystem.com/sea...mming-services

        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.

        Comment


          #5
          Thanks but I will give it a try myself, good opportunity to learn the hard way ^^

          Comment


            #6
            Ok, finally found what I was looking for by using strategy builder. In conditions and action, set a limit order as order type to be triggered by conditions set "Limit Price" to whatever indicator needed, and set general calculations in strategy builder general panel to claculation on each tick on price change and voila. Just be sure your order is set to limit to be able to assign its price value to a indicator's price data.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            20 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            119 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            63 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            45 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X