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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
41 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
66 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment