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 kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
15 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
59 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
42 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
47 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment