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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    56 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    35 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    8 views
    0 likes
    Last Post cre8able  
    Working...
    X