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 cmoran13, Yesterday, 01:02 PM
|
0 responses
30 views
0 likes
|
Last Post
by cmoran13
Yesterday, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
22 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
160 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
95 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
148 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment