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

Previous candle's low or high for a trailed stop loss without coding?

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

    Previous candle's low or high for a trailed stop loss without coding?

    Hi, I've read several posts about trailing a stoploss behind a previous candle, but none of them explain how this can be done using the Strategy Builder. I do not know how to code. I'm hoping there is a simple way to add this type of trailing stoploss to the strategies I can build easily in the Strategy Builder..
    Thanks for any suggestions!

    #2
    Hello traderbot,

    Thanks for your post.

    There is not a simple way to do this in the Strategy Builder but it can be done. What makes it a bit complicated is that you have to work within the limitations of the Strategy Builder which limits how things can be done when you don't want to use the built-in trailing stop.

    If I understand correctly you are looking to move a stop loss based on the prior bar.

    To do this you would need to use other exit methods as found in the "Order Management" folder of the "do the following" part of a set. For a stop loss you would need to use an appropriate stop exit order such as "exit long position by a stop order". Please note that when using these types of orders you would also need to replace your profit target with another exit order such as "exit long position by a limit order". In both cases, you would need to provide the specific price that you want these orders placed at.

    When using limit or stop type orders, in the Strategy Builder, you need to be aware that these orders are automatically canceled if they are not filled on the bar they are submitted. So this means that on each bar while in a position the strategy has to resubmit the order.

    What you can do is to create your entry conditions and when true have the set place your entry order and save your price target into a double type variable (that you would need to create). In another set, you would check that you are in a market position (long or short) and the action would be to submit your stop at the level of the prior bar and target orders at the price level previously saved. While you are in position the orders are resubmitted on each bar and the stop will be updated because the bars change and the profit target will remain at the value of the saved variable.

    Here are the educational resource available on the strategy builder:
    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

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you! I didn't understand very much of your response, but I'll spend some more time learning about it all. The Thursday webinars sound like a great resource for additional help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      31 views
      0 likes
      Last Post love2code2trade  
      Started by cls71, Today, 04:45 AM
      2 responses
      10 views
      0 likes
      Last Post eDanny
      by eDanny
       
      Started by proptrade13, Today, 11:06 AM
      0 responses
      2 views
      0 likes
      Last Post proptrade13  
      Started by kulwinder73, Today, 10:31 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by RookieTrader, Today, 09:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X