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 zstheorist, Today, 07:52 PM
        0 responses
        3 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        149 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Working...
        X