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 mattbsea, Today, 05:44 PM
        0 responses
        1 view
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        31 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,281 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Working...
        X