Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Sync Question

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

    Strategy Sync Question

    I have a simple strategy EnterLong + ExitLongStop + ExitLongLimit if I hit my target I cancel stop order if I hit my stop I cancel limit order.

    When I load & synchronize the strategy with an existing long position + stop & limit orders in the real account, how do I list or reference these synchronized orders in the strategy to cancel them?

    #2
    Hello delTik,

    Thank you for your post.

    When the strategy syncs it will pull from the orders that are running if you have 'Immediately submit live working historical orders' enabled under Tools > Options > Strategies > NinjaScript. You can find more information on how this is handled at the following link: http://ninjatrader.com/support/helpG..._positions.htm

    Please let me know if you have any questions.

    Comment


      #3
      NinjaTrader 8 link for information on syncing and orders: http://ninjatrader.com/support/helpG..._positions.htm

      Comment


        #4
        ok thanks, will try and understand this, maybe there's good reason but not immediately obvious why synchronization has been made so complex instead of adjusting the account and/or strategy as required using C# code or at least having the ability to do this instead of using these options?

        If anyone has time to explain how I can do this I'd appreciate it ...

        I don't run my strategy until I have real-time bars and then I want the strategy to adopt the same long/short positions and stop/limt orders as myAccount (= Account.Accounts.FirstOrDefault(a => a.Name == "Sim101") and then the strategy has the ability to cancel either the sync'd stop or limit order.

        I'm not convinced NT8 (beta 11) can do this but happy to be proved wrong?

        my fear is that if I use these options instead of code and 1) NT changes the way they are implemented and I need to constantly test that this isn't the case or 2) my strategy structure is no longer transferable to other platforms and 6 months down the line I've got to spend time getting back into it?

        Adopt account position

        Any active orders on the account previously generated by the strategy that does not match* an active strategy order will be cancelled. Should the strategy be unable to cancel and receive confirmation on the cancellation of these orders within 40 seconds the strategy will not start and an alert will be issued.

        should I create strategy orders to match account orders and if so when to prevent my active orders being cancelled?

        The matching active orders on the account will then be mapped to the active strategy orders

        how do I referencee the sync'd strategy orders?

        Only one strategy with this setting can be started at a time for an individual account and instrument.
        • The account and instrument the strategy is started on must not have any working orders which were submitted outside of the strategy. If an order is detected, the strategy can not be started until these orders have been manually managed.


        ????
        Last edited by delTik; 06-13-2016, 10:46 AM.

        Comment


          #5
          Hello delTik,

          Thank you for your response.

          The strategy runs and maintains it's own position. The idea behind the sync options is to tell the account what to do when the strategy starts, yet still allow for the strategy to maintain it's own position.

          To adopt the account position you need to look into IsAdoptAccountPositionAware: http://ninjatrader.com/support/helpG...itionaware.htm

          If the strategy is set to adopt the account position it is designed to maintain the position from there and use it's own orders. if you want the strategy to pick up manually placed orders you would need to ensure those manually placed orders would match your logic in your strategy. There is no means for the strategy to pull those orders and adjust it's logic based on manually placed orders.

          Any mapped orders during the sync would already be handled in your strategy logic (such as SetStopLoss or SetProfitTarget for example).

          You would need your strategy to place and handle orders in it's logic.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,227 views
          0 likes
          Last Post xiinteractive  
          Started by andrewtrades, Today, 04:57 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          7 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          440 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          11 views
          0 likes
          Last Post FAQtrader  
          Working...
          X