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

Entry Short/Long when StopLong/StopShort is filled

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

    Entry Short/Long when StopLong/StopShort is filled

    Dear all.

    I would like to introduce an order based on the stoploss order filled.

    For example:

    If the stoploss("name1") is filled. Inmediatly entry a Long position

    If the stoploss("name2") is filled. Inmediatly entry a Short position.

    How i could program this executions in ninja trader

    Best regards

    #2
    Hello,

    Thank you for the post.

    We have a short example that demonstrates using the OnExecutionUpdate override to control logic, this is likely what you would need to use as well.

    Determining when an order fills using OnExecutionUpdate could be used to further submit orders or do other logic.

    You can find the sample here: https://ninjatrader.com/support/foru...ead.php?t=7499

    In the sample, it specifically uses the OnExecutionUpdate to submit protective orders, you could instead use this override to look for your filled protective orders and then submit any other order based on what had filled.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by techgetgame, Today, 11:42 PM
    0 responses
    7 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Today, 11:36 PM
    0 responses
    1 view
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,612 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X