Experts: pSAR bug 4

 

pSAR bug 4:

Opens and closes orders using parabolic SAR signals now with improved features.

Author: Tonny Obare

 
  1. if(StopMult==true){StopMultd=10;} else{StopMultd=1;}
    
    The EA should automatically detect the 4 or 5 digit broker and adjust TP, SL, and slippage
    //++++ These are adjusted for 5 digit brokers.
    double  pips2points,    // slippage  3 pips    3=points    30=points
            pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    

  2.    if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES))
    
    The EA is not compatible with other EAs, or even with itself on other pairs
        for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
            OrderSelect(pos, SELECT_BY_POS)            // Only my orders w/
        &&  OrderMagicNumber() == Magic.Number         // my magic number
        &&  OrderSymbol()      == Symbol() ){          // and period and symbol
    

  3. int openbuy=OrderSend(Symbol(),OP_BUY, ...
    if(openbuy==TRUE) {Alert ...
    The output from orderSend is not bool it's the ticket number:
    if(openbuy > 0) {Alert ...

 
bit too aggresive moneymanagement. if your first trade fails you'r broke...
 
10.00 LOTS for tests...
 
The settings are very much customisable to your own strategy. Its not a must you use the default settings nor have i ever said the default settings is the best for everyone.
zzuegg:
bit too aggresive moneymanagement. if your first trade fails you'r broke...
 
You can adjust the settings to the one that suits you.
karcewzrokiem:
10.00 LOTS for tests...
 
tonny:
You can adjust the settings to the one that suits you.
karcewzrokiem:
10.00 LOTS for tests...



i know but why did You use 10 Lots insted 1??

As for me it was only for BIG profit/DEPOSIT... and this Risk is ridiculously HIGH as for tests...

 
WHRoeder:
  1. if(StopMult==true){StopMultd=10;} else{StopMultd=1;}
    
    The EA should automatically detect the 4 or 5 digit broker and adjust TP, SL, and slippage
    //++++ These are adjusted for 5 digit brokers.
    double  pips2points,    // slippage  3 pips    3=points    30=points
            pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    

  2.    if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES))
    
    The EA is not compatible with other EAs, or even with itself on other pairs
        for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
            OrderSelect(pos, SELECT_BY_POS)            // Only my orders w/
        &&  OrderMagicNumber() == Magic.Number         // my magic number
        &&  OrderSymbol()      == Symbol() ){          // and period and symbol
    

  3. int openbuy=OrderSend(Symbol(),OP_BUY, ...
    if(openbuy==TRUE) {Alert ...
    The output from orderSend is not bool it's the ticket number:
    if(openbuy > 0) {Alert ...


There is any chance to trade micro lots? I tryed to set up 0.001 lot and doesn't triggers any trade.
 

That depends on your broker. Most brokers support a minimum of 0.01 lot on their micro accounts.

lasfx:
WHRoeder:
  1. if(StopMult==true){StopMultd=10;} else{StopMultd=1;}
    
    The EA should automatically detect the 4 or 5 digit broker and adjust TP, SL, and slippage
    //++++ These are adjusted for 5 digit brokers.
    double  pips2points,    // slippage  3 pips    3=points    30=points
            pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    

  2.    if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES))
    
    The EA is not compatible with other EAs, or even with itself on other pairs
        for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
            OrderSelect(pos, SELECT_BY_POS)            // Only my orders w/
        &&  OrderMagicNumber() == Magic.Number         // my magic number
        &&  OrderSymbol()      == Symbol() ){          // and period and symbol
    

  3. int openbuy=OrderSend(Symbol(),OP_BUY, ...
    if(openbuy==TRUE) {Alert ...
    The output from orderSend is not bool it's the ticket number:
    if(openbuy > 0) {Alert ...


There is any chance to trade micro lots? I tryed to set up 0.001 lot and doesn't triggers any trade.
 

The pSAR bug 3 doesn’t work with micro lots. I set up to 0.01 lots and it doesn’t opens any trade. There is any chance to resolve this issue? Thanks.

 
yes tell your broker to support it
Reason: