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 ageeholdings, Today, 07:43 AM
    0 responses
    5 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X