Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Plot line for Stoploss
Collapse
X
-
Plot line for Stoploss
I have a strategy that has a price modification feature for the StopLoss and I would like to have a horizontal line plotted at the stop level and updated as the stop changes. (only a single line at any one time that is at the latest stop level, not multiple lines) How would that be done? Thanks.Last edited by billr; 08-09-2010, 01:01 PM.Tags: None
-
Hello billr,
Your StopLoss can use a variable for its level. Your line can also use a variable. If you use the same variable name for each then it's drawn at the same level. Below are links to method signatures for stop losses and horizontal lines.
Set the Y value for the horizontal line to the same value as your stop loss. If you're not using mode price for your stop loss than you'll have to calculate these values manually.
Place the DrawHorizontal line in the same block that places your entry orders.
You can see this reference sample for help with monitoring stop loss and target orders:
You could then monitor for when status is filled and then use RemoveDrawObject() to remove your line.Ryan M.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
639 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
572 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment