Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie question for Enter()/Exit()

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

    Newbie question for Enter()/Exit()

    Hello,

    I'm porting a strategy from another platform to NinjaScript, I'm not a trading expert but only a software developer.

    When backtesting my script I can't figure out why, when I call EnterLong()/EnterShort(), the position is opened on the next bar instead of the current (as happened on the old platform).
    What am I missing?

    Thanks
    Roberto

    #2
    Welcome to our forums Roberto, this would be expected with NinjaTrader as take the conservative approach to filling orders in backtesting - a signal is generated by your code on bar 0 can only be executed on bar 1 then, as the bar first needs to be fully closed in order to trigger the signal, so this really is the first possible trade location we can conservatively offer.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Brevo, Today, 01:45 AM
    0 responses
    2 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    4 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Working...
    X