Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Average price strategy

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

    #16
    Hi Chris,

    I have done several tests in market replay and the logic works discreetly.

    It happens that orders accumulate for example long in a progressive way up to the set limit eg: 4 long.
    The profit order is activated in the correct Working state so that 4 Sell at the correct price limit.

    It happens though in some cases that this order of Profit 4 Sell does not find the full Filled which remain in portfolio example 2 Long orders. At this point they do not have more profit order so they remain hung until for example the closing market takes place.
    In this situation by entering the log I verified that the order status "Buyorder " is no longer filled but turns into part. Filled.

    Now I wonder what function I can introduce to set the profit even on a part. Filled order succeeded to a emptying order that failed to fill?

    Thanks a lot yet
    Last edited by marubozu79; 01-10-2019, 05:18 AM.

    Comment


      #17
      Hello marubozu79,

      Thank you for the reply.

      Using the unnamage approach you will need to keep track of partial fills in OnExecutionUpdate. An example of using OnExecution and OnOrderUpdate can be found below:



      Please let me know if I can assist further.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      580 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      336 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X