Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to have conditions trigger a moving entry limit order?

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

    How to have conditions trigger a moving entry limit order?

    I'm sorry if this type of question has been answered before. I have such trouble knowing how to search for what I'm looking for as I don't know the appropriate language.

    What I desire to do is to have a conditional entry trigger when certain conditions are met. I am trying to create a strategy in which my conditions trigger an entry on the next break of the prior bar's high. I can build a strategy using strategy builder in which I enter if the break of the prior bar's high occurs on the same bar that my conditions to look for an entry are met with no problem, but don't know how to have it enter if that break of the prior bar's high doesn't occur until subsequent bars form.

    How I trade manually is once my entry conditions are met, I move my limit entry one tick above the prior bar's high until I'm filled. So in the attached example, my conditions are met to look for a long entry on the 10:15 bar, but I don't want to enter until the next break of the prior bar's high, which occurs in the 11:00 bar at a price of 34433.

    How can I create a strategy that has a condition of entering upon the next break of the prior bar's high?

    Thank you,
    Lester

    Attached Files

    #2
    Hello LesterC01,

    You can find a sample of making a break even strategy using the builder in the following link. The concept would be the same to move any order, you would need to use logic to set a price and then on each bar you call the order method to update it to that price.

    https://ninjatrader.com/support/foru...rategy-builder


    but don't know how to have it enter if that break of the prior bar's high doesn't occur until subsequent bars form.
    You could likely use two sets and a variable for that. The second set could check the condition and toggle a variable to true. On the next bar the first set could be used to check that variable and do an action which would happen on the next bar.

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

    Comment


      #3
      Thank you Jesse. I was able to get that aspect of my strategy working after learning from that Breakeven post

      Comment


        #4
        I have used the TrailBuilderExample posted by Chelsea in the linked thread:



        I have created a strategy that has a couple of entry condition sets and the entry conditions and actions are the only things that differ from the TrailBuilderExample. However, I am getting times where it doesn't stop out when it should. In the attached example I have the TrailFrequency Input set to 10 ticks and the TrailStopDistance set to -10 ticks. As it shows in the example, it went against me more than 18 ticks and still hadn't stopped out. What would be causing this?
        Attached Files

        Comment


          #5
          Hello LesterC01,

          From the images I would not be able to tell what may have gone wrong while it was running. Because a custom price is being used this is a situation which you would need to add a Print to see what values are being calculated. Based on that observation you could make any modifications needed.

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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,278 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          19 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by Tim-c, Today, 02:10 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Taddypole, Today, 02:47 PM
          0 responses
          5 views
          0 likes
          Last Post Taddypole  
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          51 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Working...
          X