Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Attaching orders to indicators automatically

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

    Attaching orders to indicators automatically

    Hello,

    Is there a way to attach an order to an indicator automatically, on the order being submitted?

    Currently if I want to attach an order to an indicator, I'm submitting the working order, then right click -> choose the order -> attach to indicator -> properties, select the indicator from the drop down, confirm. This is quite a process in real-time.

    In the order-entry hot keys setup, I can see I can setup a custom order that will be submitted referencing the bid or ask (e.g. buy stop market at the ask + 2 ticks). I would like to be able to do exactly this, except be submitted referencing an indicator (e.g. buy stop market at IndicatorXYZ + 2 ticks). Is this possible?

    Regards

    #2
    ctgry8, thanks for the post and the feed back.

    Unfortunately, it's not possible to add a hot key command to have an order attach to an indicator. This would require custom programming, however, I have submitted a feature request to our development team for consideration and the ID is SFT-2101.
    Riley S.NinjaTrader Customer Service

    Comment


      #3
      From your response, I understand that you cannot use a hotkey, however, is there anywhere in NinjaScript where you can attach an order to the indicator's plot?

      In other words, if I build an indicator that outputs a button, then the indicator can find the order, then attach the order to a plot via a NT function call... does that function call exist? (I tried searching the NinjaScript language reference but came up empty.)

      Thanks!

      Comment


        #4
        Hello neoikon,

        There is not a function for this, but you could create a script 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.

        To do this in an indicator you would need to place orders using the Addon account class.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by chbruno, Today, 04:10 PM
        0 responses
        1 view
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        5 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X