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 ezrollin, 02-26-2022, 11:14 PM
|
4 responses
189 views
0 likes
|
Last Post
by kenz987
Today, 04:38 PM
|
||
Started by futtrader, 04-27-2024, 01:16 PM
|
2 responses
35 views
0 likes
|
Last Post
by futtrader
Today, 04:35 PM
|
||
Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 03:48 PM | ||
Started by marinam, Today, 03:45 PM
|
0 responses
4 views
0 likes
|
Last Post
by marinam
Today, 03:45 PM
|
||
Decrease the size of the RegionHIghLightY on each tick when the price touches it
by cmtjoancolmenero
Started by cmtjoancolmenero, Today, 03:40 PM
|
0 responses
4 views
0 likes
|
Last Post Today, 03:40 PM |
Comment