Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

capturing filled orders from manual trades

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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

    Comment


      #3
      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


        #4
        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
        Started by gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        8 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        45 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X