Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

on Bar Open

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

    on Bar Open

    Hello all,

    I'm in the learning process so please excuse my lack of knowledge if this turns out to be a silly question. Is there a way using the strategy wizard to create a condition that looks at the open price or maybe even first tick of a new bar and allows this to be compared to the close price or maybe last tick of the prior bar? If the condition I'm looking for is true on the open of the new bar I would like the strategy to execute a trade at that time Vs. at bar close.

    I should also state that my strategy has the on bar close checked.

    So this would be a simple example (I hope). If the opening price of the new bar is > than the closing price of the prior bar than enter position.

    Thanks for the help.

    GuppyDRV

    #2
    Hello GuppyDRV,

    Thanks for your post.

    If you have the condition, "The Open price of the the current bar is greater than the Close price of the previous bar, place an order" The order would not be placed until the next bar. To have intrabar order processing you will need to "Uncheck" on bar close.

    I've attached a screen shot of the wizards condition builder that shows how to configure the condition:Open[0] > Close[1]. Open[0] would be the opening price of the currently forming bar, Close[1] is the close price of the prior bar.

    In the action section you would place your entry order.

    Please note that with tick processing enabled you are likely going to generate a lot of orders so make sure that in the strategy parameters (look for this when you apply the strategy) that you set "Entries per direction" to 1 (or however many you need).
    Attached Files

    Comment


      #3
      Paul,

      Thanks, I've placed this code into a strategy with one change being close position if bar opens = to close of prior bar and have found two things. First, it will not back test but works in MR so no big deal. Second, I have noticed a strange behavior where a bar opens at a price higher than the prior bars close which causes the system to close my position at that moment. However, when the bar closes it then shows that the open price was less than the open of the prior bar which according to the strategy logic would not have closed my position. Is there a reason why the bar would open with one price but after its close show a different price for bar open.

      Well I hope this gibberish that I have written makes some sort of convoluted sense! Thanks for your help.

      GuppyDRV

      Comment


        #4
        Hello GuppyDRV,

        Thanks for your post.

        To further assist, please post your strategy (or screenshot of the conditions/actions) and a screenshot of the chart detailing what you are seeing as well as what you would lie to see. Alternatively, please feel free to send in your strategy and screenshots to PlatformSupport[at]Ninjatrader[dot]com Please add atten:Paul and a link to this thread.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        110 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        59 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        37 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        41 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        78 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X