protected override void Initialize()
{
CalculateOnBarClose = false;
TraceOrders = true;
SetTrailStop(stoppoints*Instrument.MasterInstrument.PointValue);
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SetTrailStop Not Updating
Collapse
X
-
SetTrailStop Not Updating
I am trying to get the trailing stop to update intrabar, however it is not updating at all, even on the close of a bar. Am I doing something wrong?
Code:Tags: None
-
The stop seems to be working now but is not submitting the order. It seems like it is working in a simulated mode even though the output window tells me simulated=false. Also, it is waiting for a bar to close to submit the order. Is this normal?Last edited by toptrader; 06-03-2009, 08:57 AM.
Comment
-
toptrader,
How are you determining it is simulated? What CalculateOnBarClose setting are you using? Backtesting? Real-time? Either case, it should be sent in as the entry order gets filled provided you called the Set() before the entry order (which you have in Initialize).Josh P.NinjaTrader Customer Service
Comment
-
Apparently it is not working at all now. I am running in real-time. CalculateOnBarClose=false.Originally posted by NinjaTrader_Josh View Posttoptrader,
How are you determining it is simulated? What CalculateOnBarClose setting are you using? Backtesting? Real-time? Either case, it should be sent in as the entry order gets filled provided you called the Set() before the entry order (which you have in Initialize).
Comment
-
Try:Originally posted by toptrader View PostThere are no errors in the logs and nothing strange in the traceorders log.
Code:protected override void Initialize() { CalculateOnBarClose = false; TraceOrders = true; SetTrailStop(CalculationMode.Price,stoppoints); }
SetTrailStop(CalculationMode.Ticks, stoppointticks)
You just have to define stoppointticks instead points
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
51 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
142 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
160 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
96 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
275 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment