RK.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stop that trails at close of prior bar
Collapse
X
-
Hi rasdaka, thanks for posting. We have a few examples of break even and trailing stops in the strategy builder here:
You can do this in a hand-written script as well, while Position.MarketPosition == MarketPosition.Long/ or Short, use SetStopLoss() method, using the Price parameter type e.g.
if(Position.MarketPosition == MarketPosition.Long)
{
if(Close[0] > Close[1])
{
SetStopLoss(CalculationMode.Price, Close[1]);
}
}
Kind regards,
-ChrisL
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
88 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment