+ Reply to Thread
Results 1 to 5 of 5
 0 Attachment(s)    

Thread: Closing a partial trade

  1. #1
    Member
    Join Date
    Jun 2009
    Posts
    81

    Default Closing a partial trade

    I'd like to be able to close only part of a trade when the price reaches a certain point. The problem is if I use OrderClose() with a lot size smaller than the actual order lot size, it closes the portion but the rest of the order seems to disappear. Has anyone been able to do this via code?

    Paul

  2. #2
    Member
    Join Date
    Jan 2009
    Posts
    97

    Arrow

    You can download the EA from the link below and you will see the code that you need.

    Multi-purpose trade management ea @ Forex Factory

  3. #3
    Member
    Join Date
    Jun 2009
    Posts
    81

    Default

    Thanks, I'm looking at it now.

  4. #4
    Member
    Join Date
    Jun 2009
    Posts
    81

    Default

    I figured out what I was doing wrong from looking at the example. It helps to see the code sometimes! Thanks for the help!

    Paul

  5. #5
    Member
    Join Date
    Jan 2009
    Posts
    97

    Arrow

    Quote Originally Posted by ppentz View Post
    I figured out what I was doing wrong from looking at the example. It helps to see the code sometimes! Thanks for the help!

    Paul
    You are welcome!

+ Reply to Thread

Similar Threads

  1. 1 trade a day
    By thesecret25 in forum Ideas for expert advisors
    Replies: 15
    Last Post: 05-12-2009, 17:27
  2. Automatic closing of all open trades
    By Neo-Rio in forum Ideas for expert advisors
    Replies: 1
    Last Post: 05-07-2009, 09:00
  3. Closing Previous Orders in a Martingale Sequence
    By ixbone in forum MQL programming
    Replies: 33
    Last Post: 03-09-2009, 08:56
  4. Martingale with SL (closing previous orders)?
    By ixbone in forum MQL programming
    Replies: 1
    Last Post: 02-23-2009, 03:40
  5. Closing bar system
    By magidkaramy in forum Ideas for expert advisors
    Replies: 4
    Last Post: 12-09-2008, 12:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts