Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

no stop in onexecution (sometimes)

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

    no stop in onexecution (sometimes)

    Hello,

    it seems I have a problem with the stops in onexecution (everything else work so fine - thank you for your support).

    I show the informations from the output window at this time where you can see a correct trade at 12:29:58 (entry and stops)
    but the problem trade at 12:30:00 with no stops
    and problem trade at 12:30:04 with no stops
    and then again a correct entry at 12:36:49 (entry and stops)

    20.06.2013 12:29:58 Entered internal PlaceOrder() method at 20.06.2013 12:29:58: BarsInProgress=5 Action=Buy OrderType=Market Quantity=3.000 LimitPrice=0 StopPrice=0 SignalName='H8' FromEntrySignal=''
    EntryOrder String: Order='c620de4e95084cce83372400b63710bd/Sim101' Name='H8' State=Filled Instrument='$CHFJPY' Action=Buy Limit price=0 Stop price=0 Quantity=3.000 Type=Market Tif=Gtc OverFill=False Oco='' Filled=3000 Fill price=104,93 Token='c620de4e95084cce83372400b63710bd' Gtd='01.01.0001 00:00:00'
    Execution Order String: Order='c620de4e95084cce83372400b63710bd/Sim101' Name='H8' State=Filled Instrument='$CHFJPY' Action=Buy Limit price=0 Stop price=0 Quantity=3.000 Type=Market Tif=Gtc OverFill=False Oco='' Filled=3000 Fill price=104,93 Token='c620de4e95084cce83372400b63710bd' Gtd='01.01.0001 00:00:00'
    20.06.2013 12:29:58 Entered internal PlaceOrder() method at 20.06.2013 12:29:58: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=104,85 SignalName='StopH1a' FromEntrySignal='H8'
    20.06.2013 12:29:58 Entered internal PlaceOrder() method at 20.06.2013 12:29:58: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=104,85 SignalName='StopH1b' FromEntrySignal='H8'
    20.06.2013 12:29:58 Entered internal PlaceOrder() method at 20.06.2013 12:29:58: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=104,85 SignalName='StopH1c' FromEntrySignal='H8'
    20.06.2013 12:30:00 Entered internal PlaceOrder() method at 20.06.2013 12:30:00: BarsInProgress=5 Action=Buy OrderType=Market Quantity=3.000 LimitPrice=0 StopPrice=0 SignalName='H8' FromEntrySignal=''
    20.06.2013 12:30:04 Entered internal PlaceOrder() method at 20.06.2013 12:30:04: BarsInProgress=5 Action=Buy OrderType=Market Quantity=3.000 LimitPrice=0 StopPrice=0 SignalName='H8' FromEntrySignal=''
    20.06.2013 12:36:49 Entered internal PlaceOrder() method at 20.06.2013 12:36:49: BarsInProgress=5 Action=Buy OrderType=Market Quantity=3.000 LimitPrice=0 StopPrice=0 SignalName='D8' FromEntrySignal=''
    20.06.2013 12:36:49 Entered internal PlaceOrder() method at 20.06.2013 12:36:49: BarsInProgress=5 Action=Buy OrderType=Market Quantity=3.000 LimitPrice=0 StopPrice=0 SignalName='STO8' FromEntrySignal=''
    EntryOrder String: Order='da219e7f0a394a34ac0dea976c7bed09/Sim101' Name='D8' State=Filled Instrument='$GBPJPY' Action=Buy Limit price=0 Stop price=0 Quantity=3.000 Type=Market Tif=Gtc OverFill=False Oco='' Filled=3000 Fill price=151,073 Token='da219e7f0a394a34ac0dea976c7bed09' Gtd='01.01.0001 00:00:00'
    Execution Order String: Order='da219e7f0a394a34ac0dea976c7bed09/Sim101' Name='D8' State=Filled Instrument='$GBPJPY' Action=Buy Limit price=0 Stop price=0 Quantity=3.000 Type=Market Tif=Gtc OverFill=False Oco='' Filled=3000 Fill price=151,073 Token='da219e7f0a394a34ac0dea976c7bed09' Gtd='01.01.0001 00:00:00'
    20.06.2013 12:36:49 Entered internal PlaceOrder() method at 20.06.2013 12:36:49: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=150,99'3 SignalName='StopD1a' FromEntrySignal='D8'
    20.06.2013 12:36:49 Entered internal PlaceOrder() method at 20.06.2013 12:36:49: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=150,99'3 SignalName='StopD1b' FromEntrySignal='D8'
    20.06.2013 12:36:49 Entered internal PlaceOrder() method at 20.06.2013 12:36:49: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1.000 LimitPrice=0 StopPrice=150,99'3 SignalName='StopD1c' FromEntrySignal='D8'

    (Info: from about 10 trades it occurs 1 ore 2 times that only the entry is done but no stops - with same strategies)

    I´m watching now for days, hoping to find out the reason, but I have no idea.

    Thank you!

    Best regards
    Tony
    Last edited by tonynt; 06-20-2013, 07:50 AM. Reason: add. information

    #2
    Hello Tony,

    Thank you for your note.

    Are you using the Managed or Unmanaged Approach for your Order Methods?

    Are you using the Set methods for ProfitTaget and StopLoss?

    Can you provide the code used to place the Stops in your strategy?

    I look forward to your response.
    Last edited by NinjaTrader_PatrickH; 06-20-2013, 09:32 AM.

    Comment


      #3
      Hello Patrick,

      thank you for youre reply.

      I use managed mode and the stops are in onexecution with

      protected override void OnExecution(IExecution execution)
      {if (entryOrder1 != null && entryOrder1 == execution.Order)
      {if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
      {Print("EntryOrder String: "+entryOrder1.ToString()); Print("Execution Order String: "+execution.Order.ToString());
      stopOrder1a = ExitLongStop(0, true, 1000, execution.Order.AvgFillPrice -80 * TickSize, "StopH1a", "H8");
      stopOrder1b = ExitLongStop(0, true, 1000, execution.Order.AvgFillPrice -80 * TickSize, "StopH1b", "H8");
      stopOrder1c = ExitLongStop(0, true, 1000, execution.Order.AvgFillPrice -80 * TickSize, "StopH1c", "H8");

      (And as I mentioned: this works fine about 8 of 10 trades, and only sometimes it occurs that the stops are not there. This is the strange problem.)

      Thank you for your support!

      Best
      Tony



      Originally posted by NinjaTrader_PatrickH View Post
      Hello Tony,

      Thank you for your note.

      Are you using the Managed or Unamanged Approach for your Order Methods?

      Are you using the Set methods for ProfitTaget and StopLoss?

      Can you provide the code used to place the Stops in your strategy?

      I look forward to your response.

      Comment


        #4
        Hello Tony,

        Thank you for that information.

        Can you provide your entire strategy or possibly a simplified version that includes the entries and stops?

        If you prefer you can send this to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 866961' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader-helpdesk.com/...t&reqid=866961

        I look forward to your response.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ssijbabu, 10-07-2012, 07:10 AM
        5 responses
        4,428 views
        0 likes
        Last Post calster
        by calster
         
        Started by iceman2018, Today, 10:39 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nleitman, Yesterday, 11:46 AM
        16 responses
        44 views
        0 likes
        Last Post nleitman  
        Started by MSerag, Yesterday, 11:52 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by dcriador, Yesterday, 01:43 AM
        6 responses
        29 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X