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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        61 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X