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 CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      32 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      195 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      358 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      278 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X