Thanks!!
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.Quantity
Collapse
X
-
Position.Quantity
Can I use Position.Quantity to tell me how many positions I have opened for that pair? It doesn't seem to be working. Is the object NULL if I don't have a position opened?
Thanks!!Last edited by RiversideDude; 04-28-2016, 08:14 AM.Tags: None
-
Hello,
Position.Quantity would return the number of positions that you have for the strategy. This would not be the position value for the whole account though. I would recommend reviewing the following reference on understanding the difference between the strategy position and account position: http://ninjatrader.com/support/forum...ead.php?t=4033
If the strategy does not have a position then Position.Quantity would return a value of 0.
If we can be of any other assistance please let us know.Cody B.NinjaTrader Customer Service
-
Hmmm ... So I stopped my strategy and restarted in with the Sync account position to true, but my position quantity still shows as 0 and I have 1 opened. Can I turn this off and have my strategies always run using account based positions?
Also, when I check it a few minutes later, my strategy has been disabled and the sync set to false.
Thanks!!
Comment
-
The positions were manually placed.
I'm not looking for the strategy to open positions, just manage moving the stops and limits of manually created positions when I'm away from my computer. What is the best way to do that?
Thanks!!
Comment
-
Originally posted by RiversideDude View PostI'm not looking for the strategy to open positions, just manage moving the stops and limits of manually created positions when I'm away from my computer. What is the best way to do that?
There is no means in NinjaTrader 7 to manage manually opened positions through a NinjaScript strategy.
This is possible in NinjaTrader 8 through IsAdoptAccountPositionAware: http://ninjatrader.com/support/helpG...itionaware.htm
Please let me know if you have any questions.
Comment
-
So in NT 8 I will have the ability to completely manage all of the positions I open manually? Any restrictions? When will NT 8 be out of beta?
Thanks in advance!!
Comment
-
Can I get an answer to this question. If I can't manage trades created manually then neither NT7 nor NT8 is going to work for me.
Thanks!!Last edited by RiversideDude; 04-30-2016, 09:30 AM.
Comment
-
Originally posted by RiversideDude View PostSo in NT 8 I will have the ability to completely manage all of the positions I open manually? Any restrictions? When will NT 8 be out of beta?
Thanks in advance!!
What parts about that feature do you not understand?
Have you experimented with it yet?
Does it not work for you?
NT8's public release, aka "Out of beta", is, I believe, still an unknown.
Comment
-
-
Originally posted by RiversideDude View PostSo in NT 8 I will have the ability to completely manage all of the positions I open manually? Any restrictions? When will NT 8 be out of beta?
Thanks in advance!!
Comment
-
Originally posted by NinjaTrader_PatrickH View PostIsAdoptAccountPositionAware along with StartBehavior.AdoptAccountPosition will allow you to pick up the position of the account. This will not continue to pick up the position of the account after the initial start up of the strategy.
Comment
-
So, is it fair to assume that if I want the position picked up I just need to restart the strategy?
Thanks in advance
Comment
-
RiversideDude,
That would be correct. You can check the account position and then submit orders that you would like.
You can check PositionAccount to find the current position of the account the strategy is running on: http://ninjatrader.com/support/helpG...ionaccount.htm
You can also use OnAccountItemUpdate() to check what account and item has updated: http://ninjatrader.com/support/helpG...itemupdate.htm
Please let me know if you have any questions.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by aussugardefender, Today, 01:07 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
238 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
383 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
1 view
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
||
Started by pechtri, 06-22-2023, 02:31 AM
|
10 responses
125 views
0 likes
|
Last Post Today, 12:03 AM |
Comment