• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
        http://ninjatrader.com/support/helpG...ount_class.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by U0000999, Today, 11:23 AM
        0 responses
        2 views
        0 likes
        Last Post U0000999  
        Started by James Wallace, Today, 10:38 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by mtamaku, Today, 10:22 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by mtamaku, Today, 10:16 AM
        4 responses
        13 views
        0 likes
        Last Post mtamaku
        by mtamaku
         
        Started by hedgeplay, Yesterday, 08:04 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X