Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Position.MarketPosition across multiple instruments
Collapse
X
-
Position.MarketPosition across multiple instruments
I have a strategy that I want to simultaneously run on multiple instruments (6E, 6B, 6A, etc). Before entering a trade I want to make sure I'm not already in a trade. I usually do a Position.MarketPosition != Long/Short check. However, I only want to make sure I'm flat on a given instrument, but if I'm long or short on another instrument I still want to get in. For example, if I'm already long on the 6E and I get a signal to go short or long on the 6B, I want to be able to, but if I'm already in a position on the 6B I want ti avoid the signal. So how do I check my market position on a given instrument instead of my entire account?Tags: None
-
Originally posted by NinjaTrader_Ben View Post
I want to run multiple strategies, each one on a different instrument, so instead of checking Positions[] I want to check to see if I have a position on a specific instrument, which may be managed inside of another strategy.
Comment
-
Hello,
Strategies don't/can't communicate between each other and I believe each marketposition is specific for each strategy and instrument. So what you are trying to do is likely not possible, but I'll have someone double check this on Monday to be sure I am correct.DenNinjaTrader Customer Service
Comment
-
shodson,
Unfortunately account level positions is not available from a NinjaScript. You can only access information in relation to the particular instance of the strategy. There is no information across multiple strategies and aggregating a position off of that.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by FAQtrader, 04-25-2024, 12:00 PM
|
15 responses
230 views
0 likes
|
Last Post
by op1031
Today, 12:47 PM
|
||
Started by RaddiFX, Today, 11:26 AM
|
2 responses
8 views
0 likes
|
Last Post
by RaddiFX
Today, 12:42 PM
|
||
Started by morleyc, Today, 11:37 AM
|
2 responses
10 views
0 likes
|
Last Post
by morleyc
Today, 12:37 PM
|
||
Started by martin70, Today, 04:06 AM
|
5 responses
10 views
0 likes
|
Last Post Today, 12:31 PM | ||
Is it possible to draw some plots on the price panel and others in a separate window?
by haakonflaar
Started by haakonflaar, 07-04-2023, 02:13 PM
|
3 responses
147 views
0 likes
|
Last Post Today, 12:27 PM |
Comment