Results 1 to 10 of 10
 4 Attachment(s)    

Thread: Modification to trade managment EA

  1. #1

    Default Modification to trade managment EA

    Hi Funyoo,

    The attached EA calculates the average price and close all positions
    for specified pairs only when the specific pair is $x above average price.

    Instead of closing all the positions of a specific pair when price level is $x above the overall average price, Can you modify it such that Only the positions which are in profit are closed when price reaches $X or pips above average price of all positions but simultaneously apply a trailing stop
    $Ypips for all the remaining positions (for that specific pair) which are still in negative? Thanks.
    Attached Files Attached Files

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by scalpmaster View Post
    Hi Funyoo,

    The attached EA calculates the average price and close all positions
    for specified pairs only when the specific pair is $x above average price.

    Instead of closing all the positions of a specific pair when price level is $x above the overall average price, Can you modify it such that Only the positions which are in profit are closed when price reaches $X or pips above average price of all positions but simultaneously apply a trailing stop
    $Ypips for all the remaining positions (for that specific pair) which are still in negative? Thanks.
    Hi scalpmaster,

    ProfitMode (0=money, 1=pips), Enable_Trailing, and Enable_Close_On_Profit options added.
    Attached Files Attached Files

  3. #3

    Default

    Thanks, your coding skills are impressive as always.

    Can separate trailing stops be applied to specific pairs?
    Last edited by scalpmaster; 02-11-2010 at 22:02.

  4. #4

    Default

    Hi Funyoo
    I need help for this management EA, if run one terminal mutiple pair EAs (micro lot) i need close all trade reach $ xprofit or $ xloss. ($40profit or $20 loss)
    how to set ?
    pls explain or create new EA

    Thanks

  5. #5
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by scalpmaster View Post
    Thanks, your coding skills are impressive as always.

    Can separate trailing stops be applied to specific pairs?
    Hi scalpmaster,

    Individual trailing stops added.

    Quote Originally Posted by best2004 View Post
    Hi Funyoo
    I need help for this management EA, if run one terminal mutiple pair EAs (micro lot) i need close all trade reach $ xprofit or $ xloss. ($40profit or $20 loss)
    how to set ?
    pls explain or create new EA

    Thanks
    Hi best2004,

    Loss_CurX added.
    Attached Files Attached Files

  6. #6

    Default

    Excellent Funyoo, nice one.

  7. #7

    Default

    Hi Funyoo, there seem to be a bug...

    When I set "Enable_Close_on_profit" to false, the EA immediately close
    all the positions on the next tick. When set to true, it closes positions
    one by one that becomes profitable by 1 tick instead of waiting for
    the average price of all positions to reach user input "Profit_Cur" level
    and ->clear Only positions that are positive.

    Also, please check the trailing stop. It is suppose to be ->applied to
    Only the remaining positions that are still negative when "Profit_Cur" level
    is reached.
    Last edited by scalpmaster; 02-12-2010 at 19:33.

  8. #8
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by scalpmaster View Post
    Hi Funyoo, there seem to be a bug...

    When I set "Enable_Close_on_profit" to false, the EA immediately close
    all the positions on the next tick. When set to true, it closes positions
    one by one that becomes profitable by 1 tick instead of waiting for
    the average price of all positions to reach user input "Profit_Cur" level
    and ->clear Only positions that are positive.

    Also, please check the trailing stop. It is suppose to be ->applied to
    Only the remaining positions that are still negative when "Profit_Cur" level
    is reached.
    Hi scalpmaster,

    Here is a new version.
    Attached Files Attached Files

  9. #9

    Default

    Thank you Funyoo

  10. #10

    Default

    Quote Originally Posted by funyoo View Post
    Hi scalpmaster,
    Here is a new version.
    The EA still close all positions when Profit_Cur is reached as in original version...
    Therefore the Trailing stop part is not activated even when set to true...
    Please modify such that only the profitable/positive positions are to be closed when price level reaches Profit_Cur and trailing stops are to be applied to only the remaining negative positions.
    Last edited by scalpmaster; 02-16-2010 at 03:46.

Similar Threads

  1. Support and Resistance managment
    By Roberto76 in forum Ideas for expert advisors
    Replies: 8
    Last Post: 02-09-2015, 06:11
  2. (Request) SNOWBALL Concept trade managment EA
    By scalpmaster in forum Ideas for expert advisors
    Replies: 1
    Last Post: 10-13-2010, 20:45
  3. Replies: 0
    Last Post: 09-21-2010, 00:37
  4. Possition managment EA
    By ganja in forum Indicators
    Replies: 0
    Last Post: 10-20-2009, 11:03
  5. Money Managment
    By NICK35 in forum Expert advisors backtesting
    Replies: 2
    Last Post: 03-15-2009, 17:52

Tags for this Thread

average, closing, coding, eas, funyoo, level, pairs, pips, profit, profitable, stop, thank you, trailing

Posting Permissions

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