Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop Order isn't triggering on Entry Bar

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

    Stop Order isn't triggering on Entry Bar

    Hi NT

    Thank you for the awesome Software. I am on NT8 and tried to add the logic to my strategy but I am finding issues with Stoploss order.


    I tried both the StopMarket and Limit variation but seems like they aren't working on Live/Playback Real-time data.




    In backtest, it is working fine.



    Now when I try the same on real-time :

    1st : Order Triggered on the candle


    2nd: Now the trade should have stopped out but it remains open until the next candle.
    I am getting this error.

    The stop loss order isn't triggering on the entry bar! While the profit target order is working fine and triggering on the same candle. After the Entry candle it is punching the stoploss but then it is failing.


    Here is the TraceOrder output:
    22/05/2020 10:06:04 Strategy 'RJ/201627762': Entered internal SubmitOrderManaged() method at 22/05/2020 10:06:04: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=2920.25 SignalName='Short' FromEntrySignal='' 22/05/2020 10:06:04 Strategy 'RJ/201627762': Amended matching order at 22/05/2020 10:06:04: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=2920.25 SignalName='Short' FromEntrySignal='' 22/05/2020 10:06:14 Strategy 'RJ/201627762': Entered internal SubmitOrderManaged() method at 22/05/2020 10:06:14: BarsInProgress=0 Action=BuyToCover OrderType=StopLimit Quantity=0 LimitPrice=2923.75 StopPrice=2921.25 SignalName='ShortStop' FromEntrySignal='Short' 22/05/2020 10:06:14 Strategy 'RJ/201627762': Ignored SubmitOrderManaged() method at 22/05/2020 10:06:14: BarsInProgress=0 Action=BuyToCover OrderType=StopLimit Quantity=0 LimitPrice=2923.75 StopPrice=2921.25 SignalName='ShortStop' FromEntrySignal='Short' Reason='This was an exit order but no position exists to exit'

    It is showing that there isn't any position open at the time but there certainly is an open position named "Short" open at the time.

    I request expert opinion on this.
    Last edited by dastaan; 05-29-2020, 06:36 AM.

    #2
    Hello dastaan,

    Thank you for the post.

    Where are you triggering the stop logic from, was this OnExecutionUpdate? The position may not exist yet if this was happening from OnOrderUpdate so that could be accurate in that use case, OnExecutionUpdate would be used for any logic driven by order fills.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X