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 NinjaTrader_Brett, 05-12-2025, 03:19 PM
|
0 responses
200 views
0 likes
|
Last Post
|
||
Started by domjabs, 05-12-2025, 01:55 PM
|
2 responses
49 views
0 likes
|
Last Post
![]()
by domjabs
05-12-2025, 02:50 PM
|
||
Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
|
1 response
53 views
0 likes
|
Last Post
|
||
Started by imjustkaze, 05-12-2025, 12:20 PM
|
2 responses
89 views
0 likes
|
Last Post
![]()
by imjustkaze
05-12-2025, 02:29 PM
|
||
Started by IanS00, 05-12-2025, 11:57 AM
|
3 responses
33 views
0 likes
|
Last Post
|
Comment