Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Build a Strategy to exit a position..

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

    Build a Strategy to exit a position..

    Hello,

    I'm Using Strategy Builder to try and build an auomated setup...

    How do you exit a long posiiton to take profit and re-enter the market long again..??

    As an example.. In an uptrend, I have a cross over setup using thresholds where I want to exit a long position where it ends, take profit, (before the line crosses over to go short), and then wait for the next signal to re-enter the market on the next long again..I can't get the logic correct.. I know can use a profit target and a stop, but I'm curious on how to get the logic correct..


    Thanks Michael


    #2
    Hello Mykro,

    Thanks for your inquiry.

    If you are looking to have the strategy exit from a crossover, I suggest using the Conditions and Actions tab to configure logic that:
    • Checks if you are in a long position
    • Checks if your cross has occurred
    • Calls ExitLong to exit the position
    If you want to set a profit target for this Long Position, you can use the Targets and Stops tab and set a profit target and tie it to your long position by having the SetProfitTarget "fromEntrySignal" match the "Signal Name" for your entry.

    I would then suggest designing the Entry logic so you enter a position when:
    • The Strategy's position is flat
    • Criteria has been met for your Long entry
    The logic would then exit your positions with logic specific to going long, and your entry logic will only be used when the position is flat.

    I also suggest starting with a simple example to observe the logic is working, and then to scale up with additional logic. I have attached an example that can be tested on your end.

    Educational resources for using the Strategy Builder are linked below.

    Strategy Builder 301 - https://www.youtube.com/watch?v=_KQF2Sv27oE
    Conditions exmaples - https://ninjatrader.com/support/help...on_builder.htm
    Actions examples - https://ninjatrader.com/support/help...us/actions.htm

    Please let us know if we can be of further assistance.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    56 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X