Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help modifying my strategy

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

    Help modifying my strategy

    Hello, I am trying to get my strategy to work as I want it to but I am having difficulty with understanding variables, bool, storing prices etc. I have attached a video of the simple action I want my automated strategy to perform.

    Video: https://share.icloud.com/photos/07EN...7tp4pbi43jGTqA

    As shown in video: When the Indicator gives a signal of "2", this is determined as a breakout long. As you see above the signal bar, a horizontal entry line is made. When there is a signal of "2", I want to open a trade 1 tick above the high of that signal bar. I want the order to be placed at this level and REMAIN at that price level until the price is met or the next breakout signal occurs. If another breakout signal occurs, it would then repeat this action. Currently I can only open a trade if the bar RIGHT AFTER the signal bar breaks 1 tick above the signal bar (EnterLong[0]+1*ticksize). And if the bar RIGHT AFTER doesnt meet this level, a order is never placed. I want it to be placed regardless or not if the next bar breaks that level

    **Signal of "2" is only there for 1 bar, doesn't reoccur
    **Signal "2" is long breakout

    If anyone can help modify my attached strategy I will be very grateful, thank you!

    Strategy: (sorry, I didnt know how to download strategy so the code is a PDF attached)


    Attached Files

    #2
    Also, I have been using the Strategy Builder to make this strategy rather than writing code

    Comment


      #3
      Hello Brandon9821,

      Thanks for your post, glad you are specifying the Strategy Builder as what you are using.

      In the Strategy Builder, when you place a limit or stop order, these orders will automatically cancel if not filled on the same bar they are submitted on. Therefore to keep the order effectively in place you need to resubmit the order on each new bar until it fills or the need for the order changes.

      If you want to continue creating strategies it would be in your best interest to learn about how to use bools, how to save price into variables, If you haven't been through the educations resources for the Strategy Builder, please see:
      Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
      Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
      Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm

      For your strategy, in the set where you are placing the order is where you would set a bool variable to true and where you would save the price that you want to submit the order. In a new set, you would have two conditions to check, is the current market position flat and is the bool true, if both conditions are true then place the order at the price saved. As long as the bool remains true and the current position is flat, the order will be resubmitted, keeping it active. Once the order fills the market position is no longer flat so the order would no longer be resubmitted, or if the bool is changed to false the order would no longer resubmitted.

      You would likely need another set with yet further conditions that would be used to then reset the bool back to false.

      To be clear we cannot provide strategy writing services and we can leave this thread open for anyone that would like to do this for you.

      Alternately if you want your strategy created for you, we can provide a reference to 3rd party programmers in the NinjaTrader ecosystem that would be able to meet your needs.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      66 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      141 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      76 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      47 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      51 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X