Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit a position on close of the same bar

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

    Exit a position on close of the same bar

    Hello,

    I'm new to NT.

    I'm learning to code a strategy. Let's say using MA crossover on a DAILY bar to enter a position and then want to exit the position at the close of the bar. Is it doable? And how?

    Thanks

    #2
    Welcome to our forums Henry - this would be doable in NT but you would need to add a finer intraday series then to the strategy running on a daily chart. This way you would have access to the intraday time stamps and could exit before the daily session close. The underlying framework in our NinjaScript needed is explained here in the helpguide - http://www.ninjatrader.com/support/h...nstruments.htm

    Comment


      #3
      Appreciate your prompt response, Bertrand. I see you point and believe it will work.

      The idea I'm testing is always enter a position at market open and exit at market close the same day. This can be easily done for real trade. But to BACKTEST it, especially to go back for a long period, the intraday data may not be available. In that case, will you recommendation still work? If not, is there any alternative?

      Comment


        #4
        You're welcome Henry - unfortunately to backtest this approach you would need intraday data. Kinetick for example supplies at least 2 years of data (more on the popular contracts) to backtest with on the paid subscription (www.kinetick.com).

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        98 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X