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

Stop entry after stop loss

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

    Stop entry after stop loss

    Hello
    I could use some assistance regarding using Strategy Builder to stop my strategy from re-entering a trade on the same bar that a stop loss exited the trade on. Thank you.

    #2
    Hello jhjhawkins,

    Thank you for your post.

    You could create a condition group in your entry conditions that checks whether or not it's been at least 1 bar since the last exit:

    Click image for larger version

Name:	2021-12-03_12-47-29.png
Views:	48
Size:	21.5 KB
ID:	1180437

    This will check whether it's either been at least 1 bar since the last exit or that no exits have been submitted yet from the strategy. You can find Bars Since Exit in the Misc folder in the condition builder. Adding this to your conditions for entry would keep the entry from being fired off on the same bar as the prior exit.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      BarsSinceExecution = -1, that was what had me. Thank you very much. Just out of curiosity is there a way to make this apply to only Stop Loss exits?

      Comment


        #4
        Hello jhjhawkins,

        Thank you for your reply.

        You can add the Signal Name "Stop loss" for the Bars Since Exit Signal name to tie it to those specific executions if you're using SetStopLoss to make the stop. If a profit target closes the position that'll be more than 1 bar from a Stop Loss anyway.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by slimcactus, Today, 10:26 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Monares, Today, 10:49 AM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_JustinD  
        Started by d122y, Today, 10:20 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by trader3000a, Today, 06:41 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by trader3000a, Today, 09:23 AM
        5 responses
        19 views
        0 likes
        Last Post trader3000a  
        Working...
        X