Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I know that a stopOrder is active ?

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

    How can I know that a stopOrder is active ?

    I wrote a strategy and I canīt put a stopOrder in the right way:
    OBS.: SCheck(Sup(), 2) is a routine to verify if Sup() is below 2 * ThickSize of GetCurrentBid(). In same way, Rcheck(Res(), 2) is a routine to check if Res() is above 2 * TickSize of GetCurrentAsk().

    1 - I use OnExecution to know when a EntryOrder in filled.
    Click image for larger version

Name:	OnExecution.JPG
Views:	72
Size:	94.1 KB
ID:	1047154 2 - I use "Saida()" to update stopOrder. But if i donīt have any stopOrder, this "Saida()" canīt put any stopOrder.
    Click image for larger version

Name:	saida.JPG
Views:	69
Size:	109.6 KB
ID:	1047155 How can I verifiy if a stopOder is Accepted by broker ? I try OnOrderUpdate() without success. Can anyone help me in this problem ?

    Regards
    Eros

    #2
    Hello Eros Lima,

    Thank you for the question.

    From the image only I cannot tell what may be happening, but we do have a sample which demonstrates using OnOrderUpdate/OnExecutionUpdate for target orders including a stop order like you have pictured. https://ninjatrader.com/support/help...and_onexec.htm

    I would likely suggest experimenting with the sample as that excludes the extra logic you have pictured, this would allow you to test a more simple use case to find the status of the stop. You could then compare and contrast against what you have created to see where the problem is.

    This is the general suggestion on how to approach using order objects with targets, to observe the order being accepted that would need to happen in OnOrderUpdate. Most commonly you can use the signal name or from entry signal name as ways of locating the order in OnOrderUpdate.

    I would suggest using Prints in the override to verify you can see the order updates, I do not see any prints currently used in the images you had provided so this would be a good starting point to finding the problem. https://ninjatrader.com/support/help...lightsub=print


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    131 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X