Thank you!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
capturing filled orders from manual trades
Collapse
X
-
capturing filled orders from manual trades
Hello, I have little programming experience, my question is this: I want my strategy is idle until manually a trader enter an order. This order may be market or limit or stop, but I want the program to detect the exact moment that this order enter to the market (it was filled and become in a position), and take all available information from it (execution price, time, id, lots, buy or sell, etc.). This strategy will serve as an automatic trade manager for manually entered orders.
Thank you!Last edited by federicoo; 07-23-2015, 10:57 AM.Tags: None
-
Hello,
Thank you for the question.
A strategy would not really be able to be used in this sense. Automated Strategies are really meant to get enabled and left alone to do the logic you had provided in the script.
Also a strategy is considered its own instance, you can think of it like the strategy has a bubble. It can only see positions it makes and cant really get information outside of its bubble or receive more information from outside sources or other scripts.
As an example, lets assume in a strategy I am printing the Position information which reports flat.
I place a manual Buy order on the instrument in the SuperDom.
The Account is now Long but the strategy is printing I am flat.
This is because the strategy is not reporting the Accounts position but rather the Strategies position.
Also any manually closed order would disable the strategy as the platform assumes you want to manually trade at this point.
There are currently no supported methods to combine manual and automatic trading in a NinjaScript strategy. I am unsure if any users on the forum have any unsupported methods, in general this would not be possible.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Ok, let forget about the external trade. Lets assume that the strategy is running and the strategy send a limit order. Later, the market touch the trigger price and the order fills. I want the strategy make some decisions once the order fills and enter to market. How the strategy can take in account that the order filled? I want the strategy takes all the information regarding this filled order (execution price, time, id, lots, buy or sell, etc.), exactly the moment when this order was filled. This strategy will serve as an automatic trade manager for the filled order.
Comment
-
Hello,
That would not be an issue, a strategy can get the information for any Order or Execution it places. The main difference is that you have not placed or closed an order manually, so long as the strategy opens and closes its own positions it can retrieve all the information you are asking for.
A strategy has access to Position information, Executions and OrderUpdates so you can track the entire life of the order.
I would recommend reviewing some of the samples that come with NinjaTrader in the Tools -> Edit NinjaScript -> Strategy menu.
Also we have a collection of samples and tips for NinjaScript here: http://ninjatrader.com/support/forum...splay.php?f=29
Additionally we have a full NInjaScript reference located here: http://ninjatrader.com/support/helpG..._reference.htm
.
For checking Filled order, you would use OnExecution: http://ninjatrader.com/support/helpG...ub=onexecution
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:05 PM | ||
Started by Kaledus, Today, 01:29 PM
|
2 responses
8 views
0 likes
|
Last Post
by Kaledus
Today, 02:04 PM
|
||
Started by frankthearm, Yesterday, 09:08 AM
|
13 responses
45 views
0 likes
|
Last Post
by frankthearm
Today, 01:52 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
16 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
56 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
Comment