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

strange behaviour on target hitting

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

    strange behaviour on target hitting

    Hi guys,

    here is what I do:
    I have a strategy which has up to 3 targets and one stop which is updated on price or quantity change everytime one of the targets getting hit.
    The targets and the stop order are related to the entry order.

    My order handling presets are as follow:
    Entries per direction 3,
    Entry handling: UniqueEntries
    Stop& target submission: PerEntryExecution

    and here is the problem:
    If I'm using a small position size for the overall position lets say 4 contracts and for each target 1 contracts (I have one remaining position open) everything works fine, means that if the target 1 gets hit all the other target orders and the stop order are still active.
    But if I'm using a position size lets say 400000 (forex spot for IB, 4 lots) and for each target position 100000 (1 lot), then, if the target 1 gets hit all the other targets will be canceled. (see the print out below...)
    I have no idea about that problem...any idea?

    10.02.2010 07:49:05 Cancelled pending exit order, since associated position is closed: Order='be826073fb9b4147bdbed6f84ede16ed/Replay101' Name='T3' State=Working Instrument='$EURJPY' Action=Sell Limit price=123,76 Stop price=0 Quantity=0,1M Strategy='BWTPrecisionAutoTrader' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='be826073fb9b4147bdbed6f84ede16ed' Gtd='01.12.2099 00:00:00'
    --> Order: T3 is updated. Reason: PendingCancel
    --> Order: T3 is updated. Reason: Cancelled
    10.02.2010 07:49:05 Cancelled pending exit order, since associated position is closed: Order='959d41b5398741e4bf0230526ca9e5d3/Replay101' Name='T2' State=Working Instrument='$EURJPY' Action=Sell Limit price=123,66 Stop price=0 Quantity=0,1M Strategy='BWTPrecisionAutoTrader' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='959d41b5398741e4bf0230526ca9e5d3' Gtd='01.12.2099 00:00:00'
    --> Order: T2 is updated. Reason: PendingCancel
    --> Order: T2 is updated. Reason: Cancelled
    10.02.2010 07:49:05 Cancelled pending exit order, since associated position is closed: Order='e4255c1ac7d54c5e886ed787fc97d010/Replay101' Name='SL' State=Accepted Instrument='$EURJPY' Action=Sell Limit price=0 Stop price=123,16 Quantity=0,4M Strategy='BWTPrecisionAutoTrader' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='e4255c1ac7d54c5e886ed787fc97d010' Gtd='01.12.2099 00:00:00'
    --> Order: SL is updated. Reason: PendingCancel
    --> Order: SL is updated. Reason: Cancelled
    --> Order: T1 is updated. Reason: Filled
    --> Adjusting stop
    --> stop adjusted
    10.02.2010 07:49:05 Entered internal PlaceOrder() method at 10.02.2010 07:49:05: Action=Sell OrderType=Stop Quantity=0,3M LimitPrice=0 StopPrice=123,16 SignalName='SL' FromEntrySignal='ENTRY'
    --> Order: SL is updated. Reason: PendingSubmit
    --> Order: SL is updated. Reason: Accepted


    I have no manuall cancelation in this process, and please remark if the position size is small everthing works fine!!!!


    Many thanks for your help!

    #2
    Hello,

    I will have someone reply to you on Monday. Thank you for your patience.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello cicondo,

      Am I correct you are testing a third party strategy while connected to the Market Replay?

      Strategy='BWTPrecisionAutoTrader'

      Do you experience similar issues when you test the SampleMACrossOver while connected to the Market Replay?

      If not, please contact the third party vendor to troubleshoot the issue.
      JasonNinjaTrader Customer Service

      Comment


        #4
        No, I'm developing this strategy for BWT

        Hi Jason,

        thank you for your reply but I'm the developer of that for BWT. But anyway, I think the problem is that I do not scale in the position first. I place the complete quantity in the market and place bracket orders for all targets but the stop is the same only taged with the name of the entry order.

        But surprisingly it will work if the quantity size is small. (maybe it's a problem ot he partial fills)

        Thanks for your ideas!

        Comment


          #5
          cicondo,

          You may be running into 6.5 bugs with scaling out with multiple fills. Please try NT7 instead.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            impossible at the moment

            Thanks Josh

            for your advice but this is not really an option we have, especially to serve some
            clients with our product.
            I have now changed the entry to scale in the position and bracket each with a stop loss and a profit target. this seems to me working. But the hint is that now I have an up to 3 times higher commission rates to pay because I have to place up to 4 entries. This is not really a real world perfect solution. But scanning the forums for a right solution everybody is talking about this way to solve the requirement.
            Or do you think there will be a "cheaper" way to develop that?

            Sincerely

            Comment


              #7
              cicondo,

              Unfortunately alternate solutions are only available in NT7.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Felix Reichert, 04-26-2024, 02:12 PM
              12 responses
              92 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by llanqui, Today, 12:07 PM
              2 responses
              5 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by nleitman, Today, 11:46 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Salahinho99, Yesterday, 04:13 AM
              3 responses
              31 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by leojimenezp, 04-20-2024, 05:49 PM
              5 responses
              58 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X