Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to enter or exit a trade at the end of the bar?

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

    How to enter or exit a trade at the end of the bar?

    I am developing a strategy, which would trade on a bar close.
    I want to evaluate trade conditions right before the close and then enter or exit on close.
    Can I test it using Strategy Analyzer?
    Is there a way to make EnterLong enter the market on the last bar close rather than the next bar open?

    If not, what can you recommend?

    Thank you

    #2
    Hello,

    Thank you for the question.

    In NinjaTrader you do have the ability to create a strategy that would execute on the bar close but also update values for each tick.

    There are various ways to do this in NinjaScript, but for backtesting specifically you would want to use a MultiTimeframe strategy.

    There is a simple example of this included with NinjaTrader, you can locate it by going to the Tools -> Edit NinjaScript -> Strategy menu and looking for SampleMultiTimeFrame.

    This would be an item that needs to be manually coded so the wizard would be unable to complete this type of strategy specifically.

    If you have questions on this please let me know and I will be happy to help.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    60 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    39 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    20 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    22 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X