Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding a trailing stop after x ticks

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

    Adding a trailing stop after x ticks

    Hey guys!
    I'm trying to build a simple strategy and I'm almost done but now I've hit a wall.
    I need to have a trailing stop that only triggers after x amount of ticks (both longs and shorts) but I can't seem to find how to do this. In the builder, the trailing triggers right away.
    I'm not a coder so please explain like I'm a 5 year old, I won't be insulted!
    Thanks!

    #2
    Hello yanikphoto,


    Thank you for your post.


    First, please take a look at this forum post that goes over Getting Started with NinjaScript.


    You can review these example scripts from the forum, which demonstrate trailing behavior in the Strategy Builder. These examples also allow for dynamically changing the width of the trail stop, which is not possible when using the basic SetTrailStop from the Stops and Targets section of the Strategy Builder.


    TrailLongShortBuilderExample specifically demonstrates trailing behavior for both longs and shorts.


    If you have any other questions, please let me know.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X