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 Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,789 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,294 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X