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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
63 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
35 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
54 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
61 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
48 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment