2 152 12341252102 ...
11 20 1513

:

  1. #11

    Feb 2014
    57

















  2. #12

    Jan 2014
    1,788









  3. #13

    Feb 2014
    461
    :

    :

    int start()
    {
    if(AccountEquity()-AccountBalance()>=AccountBalance()*0.1) CloseAllTrades();
    return(0);
    }

    // insert the following after int start() {} section of EA code.
    void CloseAllTrades() {
    for (int i=0; i<OrdersTotal(); i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
    if (OrderSymbol()==Symbol()) {
    if (OrderType()==OP_BUY)
    OrderClose(OrderTicket(),OrderLots(),Bid,GetSlippa ge(),clCloseBuy);
    if (OrderType()==OP_SELL)
    OrderClose(OrderTicket(),OrderLots(),Ask,GetSlippa ge(),clCloseSell);
    if (OrderType()==OP_SELLSTOP || OrderType()==OP_SELLLIMIT ||
    OrderType()==OP_BUYSTOP || OrderType()==OP_BUYLIMIT)
    OrderDelete(OrderTicket());
    }
    }
    }
    }








     CloseAllEquity based1.png‏  

  4. #14

    Jan 2014
    1,788

    ,clCloseBuy
    ,clCloseSell









  5. #15

    Feb 2014
    461
    MEMO

    ,clCloseBuy
    ,clCloseSell









  6. #16

    Jan 2014
    1,788
    10









  7. #17

    Feb 2014
    461
    ...











     CloseAllEquity based2.png‏  

  8. #18

    Jan 2014
    1,788










  9. #19

    Feb 2014
    461
    dr.radiology ; 04-02-2014 10:50 AM

  10. #20

    Feb 2014
    461
    :
    if(AccountEquity()-AccountBalance()>=AccountBalance()*0.1)


    ...
    :
    100
    20
    10
    120
    110 10










    dr.radiology ; 04-02-2014 01:14 PM