Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trailing Stop not working via Strategy Wizard
Collapse
X
-
CalculationMode.Percent not working
I can get the TS to work with a mode of Ticks and an amount, but I can't get it to work with Percent...
For example:
SetTrailStop("", CalculationMode.Percent, 4, false);
With that I get the following error in the log:
Calculated trail stop price for strategy 'crossTS2/...581' was smaller/equal 0. No trail stop order placed.
Comment
-
Setting for trailing stop
I have just started trying out writing some strategy, and is running into some trouble with trailing stop. I have tried both tick & percent, and tried both True & false, but it is apparently not functioning. I use some very obvious setting, like 5 ticks, 1% (0.01) for percent. Any idea where it could have been wrong?
Comment
-
Thanks for your prompt reply.
Let me try to elaborate what I wanted to achieve. Say after I enter a long position, the price rise. I want to let my position to grow as price continue its rise; and if the price stop rising, and reverse by a fixed %, I would like to stop out. In the strategy analyser, I have tried use some value (like 1%, 5 ticks) that should sure trigger the stop for my initial trial, but it didn't trigger at all, which is very puzzling. I have been doing this while I trade stocks, so I feel it is logical. Hope to get some insight from you.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
67 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
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment