Results 1 to 3 of 3
 0 Attachment(s)    

Thread: Equity Stop - HELP

  1. #1

    Question Equity Stop - HELP

    I would like to stop out if the order is losing 3%(TotalEquityRiskPercent) of my equity, I tried the code below, but it is not right, please help me. Thanks in advance

    if (AccountFreeMargin() <= 0.0 || (EquityStop && AccountEquity() < AccountBalance() * (1 - TotalEquityRiskPercent / 100.0)))

  2. #2

    Default

    Code:
    if(EquityStop && AccountEquity() < (1-TotalEquityRiskPercent*0.01) * StartingEquity)
    //Close orders here...
    You will need the StartingEquity here.
    FXCode Inc.
    Expert Advisor Developer

  3. #3

    Arrow

    Quote Originally Posted by FXCode View Post
    Code:
    if(EquityStop && AccountEquity() < (1-TotalEquityRiskPercent*0.01) * StartingEquity)
    //Close orders here...
    You will need the StartingEquity here.
    Thank you very much!

Similar Threads

  1. EA for auto sell stop and buy stop
    By Amirul1611$ in forum MQL programming
    Replies: 0
    Last Post: 11-26-2015, 13:06
  2. Please help to code EA for Buy Stop and Sell Stop
    By tiger628 in forum MQL programming
    Replies: 0
    Last Post: 03-27-2011, 05:18
  3. Entry Buy stop and stop loss
    By clevertrader in forum MQL programming
    Replies: 0
    Last Post: 11-09-2010, 16:05
  4. Waddah Attar Win EA - with Trailing Stop & Stop Loss
    By dlhc in forum Scripts and other tools
    Replies: 0
    Last Post: 03-09-2010, 12:33

Tags for this Thread

100, stop

Posting Permissions

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