Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Long as in Stop Loss

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

    Enter Long as in Stop Loss

    Hi, I've noticed that in backtesting NT enters long or short once the bar closes. For example, if I need to enter long once the current price reaches a previous high, NT will enter long next bar open if the current bar goes upper than a previous high.

    But in realtime data feed, if onbaronclose is setted to "false" NT will enterlong realtime (with some slippage obviously) once previous high is triggered and before the current bar closes.

    The fact is that results in backtest will differ a lot and for an analysis purpose, I'd like to get the statics as similar as in realtime data with onbaronclose setted to false.

    I've noticed also that SetStopLoss feature can be setted to "true" in order to simulate the stop limit price once is reached.

    The question is if can I set an enterlong price like the "true" feature in SetStopLoss feature, in order to enterlong on a specific price on backtest.

    Thanks in advance.

    #2
    fercho,

    In this case, I would suggest using the following reference sample if you want to have your strategy behave similar in real time to backtesting.

    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    118 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    166 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    85 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    130 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    88 views
    0 likes
    Last Post PaulMohn  
    Working...
    X