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
    Paul H.NinjaTrader Customer Service

    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.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Tim-c, Today, 10:58 AM
        0 responses
        1 view
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by traderqz, Yesterday, 09:06 AM
        3 responses
        21 views
        0 likes
        Last Post NinjaTrader_ThomasC  
        Started by f.saeidi, Today, 10:19 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by kujista, Today, 06:23 AM
        5 responses
        18 views
        0 likes
        Last Post kujista
        by kujista
         
        Started by traderqz, Today, 12:06 AM
        3 responses
        6 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X