Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Get existing stoploss and limit orders to update labels
Collapse
X
-
Get existing stoploss and limit orders to update labels
I am creating an indicator for the chart that shows the current stoploss and limit orders. For example, the strategy creates a long L1 L2 and L3 and it creates a stoploss and 3 separate profit targets for L1 L2 and L3. The chart gets vey busy and I cannot see what the targets are. So my label box will show each target. I need help once the order is filled getting the existing target prices of the limit orders. If I could get some direction as to how to code that. I would appreciate the help.Tags: None
-
Hi set2win, thanks for your post.
An indicator will need to implement an Addon style Account object like in the example here. From there you would subscribe to the OrderUpdate event method and get the order price data from this event.
Best regards,
-ChrisL
-
so i would request each oco then using e.Order.Instrument.MasterInstrument.TickSize, 0, oco, "Profit Target", Core.Globals.MaxDate, null I could get the price. I just can not figure how I would note which one was which as I will have multiple results. Since there will be 3 different targets I guess I could use math comparison to figure the higher price targets.
Comment
-
Hi, thanks for your reply.
You would use the signal name given to the order to tell them apart. If you are submitting the stop and target through one of the Set methods, we have an example here that puts them into a list to keep track of each one:
https://ninjatrader.com/support/help..._and_profi.htm
Best regards,
-ChrisL
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
52 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment