Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not closing of orders after Stop

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

    Not closing of orders after Stop

    Hello good afternoon.

    I have a problem, I have a well defined strategy with entry, stop and target. For example, if the defined parameters are true, the entry is made with (2 contracts), also defining the stop and target with (2 contracts).

    But the problem faced is that when going to the stop the entry is canceled correctly but it remains only (1 contract) of the target remains active and I have to close it manually.

    Below I made the code available via Google Drive, would you have any idea what might be happening?

    Thanks in advance for your help.
    Last edited by WenisCR; 04-05-2023, 12:49 PM.

    #2
    Hello, thanks for writing in. The first adjustment you should make to this strategy is not using "EntryOrder" for both your long and short entries. Make a separate "EntryOrder" for long or short entries. I am not going to debug this script, but I am thinking the issue you are seeing is coming from mixing up orders in this way. I tested the OnOrderUpdate example that we have by simply changing the entry order quantity to 2 and this is working fine:

    Comment


      #3
      Hi Chris, how are you doing?
      Got it, thanks for the info and even more for the correction tip. I'll test it and report back.
      Thanks a lot for the help.​

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      132 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X