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 NullPointStrategies, Today, 05:17 AM
      0 responses
      46 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      66 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X