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
getting open positions
Collapse
X
-
getting open positions
We are finishing up a strategy and are coding position sizing based on Kelly Formula. In our calculations we would also like to use in the formula "number of current open positions" , Is there a function to get the open positions? We are using IB. Thanks for any help.Tags: None
-
Hello,
There is not a supported function to get all open positions on all instruments.
Each strategy instances will only be aware of the positions on that strategy. There is no cross communication between strategy instances and there is no way to read the position directly from another strategy.MatthewNinjaTrader Product Management
-
We have studied extensively over our backtesting the amount of concurrent positions open in order to determine ASR (account size required) for each strategy so we have decided to incorporate the same logic in to our position sizing algo. So we simply need a count of open positions at the time a new signal is triggered. The position values like P&L, share quantity, etc etc is not relevant for the calculation. We just need to know the quantity of open positions. Thanks.
Comment
-
Hello,
If this is all from the same strategy instance, you can get it using a Position object.
Please see our Help Guide on these objects for more information:
As long as you have one strategy instance that is opening positions on these instrument, you can obtain the information. If you have separate instances running on different instruments, the position information cannot be shared.MatthewNinjaTrader Product Management
Comment
-
Hello,
I was having the same problem with the lack of inter-strategy communication that NinjaTrader offers. So, we went out of the bos to create a small algorithm to workaround this issue. Please read this article:
Feel free to contact us if you need this implemented in your strategies.
Thanks
Umer
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnMoss, 03-04-2024, 01:53 PM
|
3 responses
47 views
0 likes
|
Last Post
by AndyM
Today, 06:13 PM
|
||
Started by algospoke, Today, 06:01 PM
|
0 responses
8 views
0 likes
|
Last Post
by algospoke
Today, 06:01 PM
|
||
Started by cre8able, Today, 05:53 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 05:53 PM
|
||
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
24 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
32 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
Comment