Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

On.....() method for StopLoss order

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

    On.....() method for StopLoss order

    Hi,

    Is there a public void On<something>() method for the SetStoploss method? I've tried catching all the messages from OnExecution(), OnPositionUpdate() etc but that doesnt give back messages when the SetStoploss() method is called. I would like to catch the system messages when I set the stoploss so I know the system has acknowledges my stoploss order and I get write it to a log-file.

    I've notice that once the Stoploss has been set, and is updated, then I get OnOrderUpdate() statements.. But I don't know how to receive anything when the Stoploss is first set right after the long/short entry.

    Thanks.
    Last edited by siroki; 03-29-2014, 03:47 AM.

    #2
    Originally posted by siroki View Post
    Hi,

    Is there a public void On<something>() method for the SetStoploss method? I've tried catching all the messages from OnExecution(), OnPositionUpdate() etc but that doesnt give back messages when the SetStoploss() method is called. I would like to catch the system messages when I set the stoploss so I know the system has acknowledges my stoploss order and I get write it to a log-file.

    I've notice that once the Stoploss has been set, and is updated, then I get OnOrderUpdate() statements.. But I don't know how to receive anything when the Stoploss is first set right after the long/short entry.

    Thanks.
    Turn TraceOrders on and examine the log (or Output Window).

    ref: http://www.ninjatrader.com/support/h...raceorders.htm

    Comment


      #3
      Thanks for your reply, but not entirely what I was looking for. Because TraceOrders doesn't allow me to catch the individual messages and handle them in my custom code.

      There should be an event handler for the SetStoploss right? At least, I would hope so.

      Comment


        #4
        Originally posted by siroki View Post
        Thanks for your reply, but not entirely what I was looking for. Because TraceOrders doesn't allow me to catch the individual messages and handle them in my custom code.

        There should be an event handler for the SetStoploss right? At least, I would hope so.
        Using TraceOrders will clearly tell you whether or not there is something that you can use to track whatever it is that you want to track, and give you an idea of what to trap, and with what event handler.

        IOW, because I do not use the method, I cannot tell you definitely one way or another, but, by using TraceOrders, you can find out that information for yourself.
        Last edited by koganam; 03-29-2014, 09:18 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Working...
        X