Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ntDirect.dll Close a position
Collapse
X
-
Hello Markus,
I've received tracking ID# NTEIGHT-14090 for this behavior where an active Atm is not fully closed through the API with the CLOSESTRATEGY command.
As new releases of NinjaTrader become available, please check the release notes for this ID.
Once the ID is listed, please update and confirm the behavior is corrected.
-
Hello Markus,
I'm finding if the order is submitted by the external app, the Atm ID is returned but does not if the order is made within NT.
Once I was retrieving the Atm ID I was able to produce behavior where the position, stop, and target are not closed, but the Active Atm is turned off.
I've reported this behavior to our development. Once I have a tracking ID for this behavior I will post in this thread.
Leave a comment:
-
Hi Chelsea,
yes.
As I wrote in my first post, _ntClient.StrategyPosition(_uuid) gets the right position size of the current running strategy. But using this _uuid by CLOSESTRATEGY the retutn value of the command function is zero, which suggesting everthing is fine, but nothing happens....
In the LOG tab the id is the same as I'm using and it should work, obviously there is an issue with this command.
Leave a comment:
-
Hello Markus,
My apologies, I focused on the wrong command when I went to the help guide.
In trying to test the CLOSESTRATEGY command I'm finding there may be an issue with the Strategies() method that returns the list of IDs.
If you Console.WriteLine() the string returned from Strategies() are you finding this is working on your end and properly returning the instance IDs?Last edited by NinjaTrader_ChelseaB; 10-10-2019, 09:39 AM.
Leave a comment:
-
Hello Chelsea,
once again me...
I tried the CLOSEPOSITION command, this works. How I get the fill price of the closing command? I have no idea how to get this value.
Cheers
Markus
Leave a comment:
-
Hello Chelsea,
as you can see I like to close the position by CLOSESTRATEGY, this is because I opened this by a strategy.
In the description you wrote, the only 2 parameters I need to fill is the command and the strategieId... this should work. If this is wrong then the description is confusing.
When I'm using the CLOSEPOSITION command all the open positions are closed within the account and instrument.
Or I'm wrong?
Thx
Markus
Leave a comment:
-
Hello Markus,
Are you supplying the account name and instrument name?
From the help guide:
"CLOSEPOSITION COMMAND
This command will close a position and requires an account name value and an instrument name value. The instrument name value is the name of the NinjaTrader instrument including the exchange name. For equities, the symbol is sufficient. This command will cancel any working orders and flatten the position."
Leave a comment:
-
ntDirect.dll Close a position
Good Morning @all,
I need a bit advice because I don't understand this issue:
I placed an order via NTDirect.Dll, using a strategy. This works fine, but if I like to close this via the Command(CLOSESTRATEGY) the response is 0 (No Error) but in the Log Tab I see
the following message:
using the following line of code:OIF, 'CLOSESTRATEGY;;;;0;;0;0;;;;;669ADE6DD50E4EC6BEDF5 B62A59235F5' unknown strategy
_ntClient.Command("CLOSESTRATEGY", null, null, null, 0, null, 0, 0, null, null, null, null, _ntClient.Strategies(_currentAccount));
Very interessting at this point, using the same "unkown strategy" ID by _ntClient.StrategyPosition(_uuid) I receive the correct position size....
Any suggestions?
Thx for your advice
MarkusTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Leave a comment: