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

Stop Loss under OnExecution() vs. OnBarUpdate()

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

    Stop Loss under OnExecution() vs. OnBarUpdate()

    Do I have this correct for stops....When using ExitLongStop under OnExecution() this is setting the stop as soon as the trade is executed. Using SetStopLoss under OnBarUpdate() and say I'm using 5min bars, the stop will not be set until a 5min bar completes(if CalcOnBarClose=True). So using SetStop your stop placement is subject to a potential 5min delay and could even be missed. Therefore setting the stop under OnExecution() would be the better route?

    #2
    Hello,

    Both using ExitLongStop in OnExecution() and SetStopLoss in OnBarUpdate will have the stops applied intrabar.

    The set methods are special calls that allow entry orders to be bracketed right off the bat.


    When dealing with more complex order management the OnExecution() route is going to offer more flexibility.

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Philippe56140, 04-27-2024, 02:35 PM
    8 responses
    65 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by memonic, Yesterday, 01:23 PM
    3 responses
    26 views
    0 likes
    Last Post memonic
    by memonic
     
    Started by Luke Heinrich, Yesterday, 03:25 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by gemify, 03-08-2023, 08:02 AM
    10 responses
    154 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by nissan200sx55, Today, 06:25 AM
    0 responses
    3 views
    0 likes
    Last Post nissan200sx55  
    Working...
    X