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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment