Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy with trailing stop based on high/low of previous bar +- some input value
Collapse
X
-
Strategy with trailing stop based on high/low of previous bar +- some input value
I am attempting to build a strategy with a trailing stop that is based on the High/Low (short position/long position) of the previous bar +- some input value. I can't see any coding method for that within the strategy builder stop and target section. Is this possible and can you provide me some examples of how it would be codedTags: None
-
Hello gjbeaudin,
Thank you for your inqiry.
The Set methods in the Stops and Targets section of the Strategy Builder only allow for simple stops and targets that cannot be changed dynamically. Programming by hand will offer more flexibility, but you can also create your own logic in Conditions and Actions that controls how you would like to exit.
We can not offer services to design strategy logic in the support department, but you may conceptualize the following as an example of using Exit orders to mimic Trail stop functionality:- If the strategy is flat, set a bool to controlling your auto trail behaviors to false. Then Enter.
- If the strategy is not flat and some condition happens that you would like to trigger your auto trail, set the bool to true.
- If the strategy is not flat and the bool is false, place your initial stop loss as an Exit Order.
- If the strategy is not flat and the bool is true, modify the Exit Order in association to the current market price.
Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k
I'm also attaching a basic example of setting this functionality up in the Strategy Builder.
Please let us know if we may be of further assistance to you.Attached Files
-
Don't know if you ever found a solution, but both of these use different methods but do what you are asking:Originally posted by gjbeaudin View PostI am attempting to build a strategy with a trailing stop that is based on the High/Low (short position/long position) of the previous bar +- some input value. I can't see any coding method for that within the strategy builder stop and target section. Is this possible and can you provide me some examples of how it would be coded
1) https://ninjatraderecosystem.com/use...bot-indicator/
2) https://ninjatraderecosystem.com/use...er-entry-v4-2/
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
86 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
151 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
79 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
53 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
61 views
0 likes
|
Last Post
|

Comment