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 geddyisodin, Today, 05:20 AM
        3 responses
        20 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by lorem, Today, 09:18 AM
        1 response
        4 views
        0 likes
        Last Post lorem
        by lorem
         
        Started by bmartz, Today, 09:30 AM
        0 responses
        3 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by GussJ, 03-04-2020, 03:11 PM
        14 responses
        3,245 views
        0 likes
        Last Post GussJ
        by GussJ
         
        Started by ArkansasClint, Today, 09:28 AM
        0 responses
        0 views
        0 likes
        Last Post ArkansasClint  
        Working...
        X