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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
169 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
88 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
128 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
208 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
185 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment