• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Palce sell order on the Next bar after condition has been met

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

    Palce sell order on the Next bar after condition has been met

    Hello,

    My strategy so far has the following logic listed below. The stop loss and profit target aren't important at this point.
    When RSI goes above 80 place a sell order.

    It's working as expected, but the problem is I don't want it to place the order immediately when the condition has been met.

    My observation has been the price will continue to rise during the following bar. So, I'd like the strategy to place the sell order on the next bar after the condition's been met.

    Thanks for the help,
    Tom

    #2
    Hello tommartin321,

    This is certainly possible, can you tell me are you manually coding this or using the Builder?

    In manual coding, you could use a boolean variable. When your condition is true, set the variable to true. On the next OnbarUpdate, another condition could check for that variable being true and submit the order.

    If you are using the builder, the steps would be similar.
    In one set check if a boolean user variable is set to true and if so submit the order and set it back to false.
    In another set, check your original condition and set the boolean user variable to true.

    The order of the sets is important, you want to check if the variable is true in one set before you actually set it in any of the other sets that follow. This would ensure that you wait for a bar after it gets set to check it again.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse. I'm using the Strategy Builder. Fist let me make sure I have the correct Default Properties set for Calculate.

      For Calculate, I have it set to "On bar close". Is this correct?

      Comment


        #4
        Hello,

        Yes, that would be correct in respect to my previous post, but the setting would need to reflect your overall trading goal and concept. If your concept works with OnBarClose, then yes this would be correct.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by joemiller, Today, 07:33 AM
        0 responses
        6 views
        0 likes
        Last Post joemiller  
        Started by isnercrypto, Today, 06:42 AM
        0 responses
        4 views
        0 likes
        Last Post isnercrypto  
        Started by Coursocied67, Today, 04:02 AM
        0 responses
        5 views
        0 likes
        Last Post Coursocied67  
        Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
        7 responses
        37 views
        0 likes
        Last Post DaveS
        by DaveS
         
        Started by claxxical, Yesterday, 10:00 PM
        0 responses
        11 views
        0 likes
        Last Post claxxical  
        Working...
        X