my strategy is calculating based on oneachtick and I am using SetTrailStop(@"Long", CalculationMode.Ticks, StopLossDistanceInTicks, false); to trail the stop. Now, is it possible to update the trailing stop only on bar close? I am using the settrailstop method in state.configure? If yes, can you please suggest?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
set trailing stop
Collapse
X
-
set trailing stop
Hi,
my strategy is calculating based on oneachtick and I am using SetTrailStop(@"Long", CalculationMode.Ticks, StopLossDistanceInTicks, false); to trail the stop. Now, is it possible to update the trailing stop only on bar close? I am using the settrailstop method in state.configure? If yes, can you please suggest?Tags: None
-
Hello asmmbillah,
Thanks for the post.
The SetTrailStop would follow the scripts Calculate setting so that would not be possible with that method specifically. You could submit your own stop order using SetStopLoss instead of using the SetTrailStop and then control the trailing from OnBarUpdate. In OnBarUpdate you can add a condition that uses IsFirstTickOfBar to simulate OnBarClose.
I look forward to being of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
681 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
386 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
584 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
585 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment