Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trailing stop attachment
Collapse
X
-
Hi Teebone21, thanks for your question.
I have an example here on a break even in the strategy builder. You can take this same concept and update the stop loss to a value that changes over time instead of the average entry price.
Please let me know if I can assist any further.
Attached Files
- Likes 2
-
Hello Chris,
please could you explain:
when StopLossMode == 0 is likely expected a stop loss set on the next tab of the SB?
I remember a similar sample using state/ bool, is there a specific reason this sample now uses a StopLossMode/ integer ? What is the advantage?
How would it be possible to add another exit condition working together with the breakeven when StopLossMode==1, for example exit when current price crosses low[1] ?
thank you.
Comment
-
Hello guidoisot,
Thanks for your post.
When there are two condition states you can use a bool or you can use a numerical value, either way makes no difference as it is up to you as the programmer to know if you are using a bool or a numerical value.
Yes, you can add another exit condition when the variable StopLossMode is equal to 1. You would basically copy set 4 and add the cross condition and change the exit to an ExitLong.
- Likes 1
Comment
-
thank you.
I have added a third exit but it does not work.
At time 16:00 there is also a trade that does not breakeven.
Please can you help to find out why?
BREAKEVENstrategyMANUAL02.cs
Last edited by guidoisot; 04-29-2020, 06:54 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
61 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
34 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
198 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
364 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
283 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment