Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SWING as stop loss
Collapse
X
-
Hello ampf27,
Thanks for your post.
You could use Swing(int strength).SwingHigh[int barsAgo] and Swing(int strength).SwingLow[int barsAgo] to get the Swing High and Swing Low values.
Those values could then be offset by a certain number of ticks when used for your stop-loss order price.
For example, the code to use the price of the Swing Low value - 5 Ticks for a stop loss would look something like this.
ExitLongStopMarket(1, Swing(5).SwingLow[0] - 5 * TickSize);
See the help guide documentation below for more information.
Swing: https://ninjatrader.com/support/help.../nt8/swing.htm
TickSize: https://ninjatrader.com/support/help...8/ticksize.htm
Managed Approach Order Methods: https://ninjatrader.com/support/help...d_approach.htm
Let me know if I may assist you further.Last edited by NinjaTrader_BrandonH; 02-05-2023, 05:36 PM.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
89 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment