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

Partial entry orders resulting in cancelled stops and targets

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

    #16
    Originally posted by bltdavid View Post
    But, think carefully, you've essentially proven nothing.

    Will the next version of NT8 behave the same?
    You don't know, this is unsupported and undefined behavior.
    Of course it will. Ninjatrader has essentially said they have done nothing to the trading orders engine for NT8, except make a few changes in the method definitions. They said it all behaves the same. Scroll down to re-read where Patrick H. says exactly that. There is no reason to think that will change. If it does change, maybe it will be that they'll fix this and this whole discussion is rendered moot and it seems to me, they could fix this. There is no reason whatsoever why Ninja has to blow away the stops and targets when they could assign a "from ID" to the stop and target and kill just the target and assign a new quantity to the stop when Position.Quantity > 0. After all, when the entry is filled in the same order and not split into part-fills, it all works exactly the way you'd expect so going from here to there doesn't seem to me to be that much of jump.

    Originally posted by bltdavid View Post
    Will the behavior be the same with MR vs Sim101 vs Live?
    You don't know, since the engineers were never told they had to care about this, there is no guarantee it will work the same. Even different adapters (Continuum vs Rithmic vs IB) could show different behaviors here.
    If you've played with the Market Replay, you know that there is no guarantee that anything behaves the same. And you seem to play loosely with the word "could" because I sincerely, vehemently doubt that different adapters will change the definition of "OrderState == Cancelled" or any other enumeration defined in Ninja.

    Originally posted by bltdavid View Post
    Will the behavior be the same if you change your quantities?
    You don't know, you'll have to repeat all your testing, including MR, Sim101, and live.
    Who cares? I'm copying quantities from the cancelled object to the replacement object exactly as they are. And if you're talking about entry quantities, whoever implements this workaround would have to take care of those themselves, just like they'd have to code for anything else.

    Originally posted by bltdavid View Post
    Why take the risk?
    Using Unmanaged mode is the correct way to do what you want, and migrating code from Managed to Unmanaged is relatively painless.
    Is it really "painless" when you have to take care of every last detail, you have to get it right and you have to be perfect? Either way, rigorous testing is required.

    Originally posted by bltdavid View Post
    If you use this strategy to trade real money in a live account, the only thing you have proven is you are willing to take a foolish and completely unnecessary risk with your money.

    To be carefree about this risk -- which is systemic to how NinjaTrader.exe operates in Managed mode -- is mind boggling.
    It sounds like you have a bias against managed orders and those who don't mind it are "foolish."

    Originally posted by bltdavid View Post
    You can eliminate this specific systemic risk by moving to Unmanaged mode.
    Why would you not do that?
    Because I'm not interested in all the risk involved in having to think of every last detail. I have seen with my own eyes, software that costs thousands of dollars I was asked to fix that used unmanaged orders which often resulted in orphaned trades (those with no stop or target to protect it). Although his methodology and coding was sound, you couldn't follow the order flow to save your life. I'm not going down that road if I don't have to.

    Is sure sounds like I have the same bias against unmanaged as you do against managed.

    Originally posted by bltdavid View Post
    Your target orders used ExitLongLimit() & ExitShortLimit(), which are limit orders.
    The entries, which are what I meant when I said that, are market orders and those target orders are for quantity of one, except the stop orders. In fact, none of the ExitLong/StopLimit() parameters even matter since they are copied over from the original order to the replacement order.

    This isn't that hard, once I found out that Ninja wouldn't blow away what I just replaced using whatever criteria they're using, presumably the name. It is doable, completely doable and if I run into a snag, I'll let you know.

    Comment


      #17
      I know you from BMT, my friend, and I will always admire and respect your skills, both from BMT and here.

      This thread does not change anything with regard to that, I'd still like to have a few beers and discuss all the interesting things we've both learned.

      Yes, "foolish" is in the eye of the beholder, you are right.
      [But, I meant the decision, not the person. No offense intended.]

      And, despite what you might think, I hope I am wrong and you are right.

      If you ever come to San Francisco or San Jose area, let me know, I'll happily buy us a beer or two.

      Comment


        #18
        Originally posted by traderpards View Post
        those target orders are for quantity of one
        I totally agree about the need for rigorous testing.

        My last caveat is that if you scale this strategy, and increase your target quantities, please be extra careful and very thorough with your testing.

        If I remember right, my code found some dragons there.

        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