Experts: RoNz Auto SL-TS-TP v.2 - page 22

 
free4amir:

Hi Roni,

Thank's for great EA.It's the best trailig EA that I ever seen.

I used previous version and all things good.when update to new version no SL or TP appears on chart and not trail to work!

what happened?What am I doing wrong?

in stoploss ,calculate spread too please.it means that the SL line show the exact price that close the order not the price + spread.

when price near the SL order closed and distance is spread.please remove this distance in view  of SL line.therefore the SL line shows exact price that close the order.

youstruly

Hi, thanks.


When update to new version, please re-configure the EA according to your old parameter. Sometime the parameters are back to it's default settings.

For the SL, I use exact price for easy calculation. User have to calculate it's own price + spread. 

 

Hi Roni,


Probably a long shot but...


Is it possible to add a max spread function that uses the chartsymbolselection input?

By this I mean, option to set a max spread amount and choose set that max spread to all open charts or current chart only.

 

Hello, nice script

there is an error 

order modify error 1

         if(OrderStopLoss()==0.0 && OrderTakeProfit()==0.0){
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,TP,0,Blue);
               if(!OrderModify(OrderTicket(),OrderOpenPrice(),SL,TP,0,Blue))
                  Print("OrderModify Error1: ",ErrorDescription(GetLastError()));}

         else if(OrderTakeProfit()==0.0){
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),TP,0,Blue);
               if(!OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),TP,0,Blue))
                  Print("OrderModify Error2: ",ErrorDescription(GetLastError()));}
         else if(OrderStopLoss()==0.0){
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,Red);
               if(!OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,Red))
                  Print("OrderModify Error3: ",ErrorDescription(GetLastError()));}
        }

2019.12.05 21:01:16.345    2019.10.04 16:00:28  gggb  GBPUSD,M5: OrderModify Error2: no error, trade conditions not changed

any fix from your side?

 

i have fixed the problem adding some codes..

your codes...

         if(OrderType()==OP_BUY)
           {
            SL=(StopLoss>0)?NormalizeDouble(OrderOpenPrice()-((StopLoss+minstoplevel)*point),digits):0;
            TP=(TakeProfit>0)?NormalizeDouble(OrderOpenPrice()+((TakeProfit+minstoplevel)*point),digits):0;
           }
         else if(OrderType()==OP_SELL)
           {
            SL=(StopLoss>0)?NormalizeDouble(OrderOpenPrice()+((StopLoss+minstoplevel)*point),digits):0;
            TP=(TakeProfit>0)?NormalizeDouble(OrderOpenPrice()-((TakeProfit+minstoplevel)*point),digits):0;
           }

         if(OrderStopLoss()==0.0 && OrderTakeProfit()==0.0)
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,TP,0,Blue);
         else if(OrderTakeProfit()==0.0)
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),TP,0,Blue);
         else if(OrderStopLoss()==0.0)
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,Red);
        }
    

update the script with this...

         if(OrderStopLoss()==0.0 && OrderTakeProfit()==0.0)
           if(StopLoss>0 && TakeProfit>0)
           {
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,TP,0,Blue);
            if(!res)Print("Buy&Sell Modify Error: ",ErrorDescription(GetLastError()));
           }
         else if(OrderTakeProfit()==0.0)
           if(TakeProfit>0)
           {
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),TP,0,Blue);
            if(!res)Print("Buy Modify Error: ",ErrorDescription(GetLastError()));
           }
         else if(OrderStopLoss()==0.0)
           if(StopLoss>0)
           {
            bool res=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,Red);
            if(!res) Print("Sell Modify Error: ",ErrorDescription(GetLastError()));
           }
add include also
#include <stdlib.mqh>

Thanks...

:)

 

Hi Roni, thank you for facilitating this EA. I am a little neophyte with these experts and I need to know how I can configure an order to operate the DAX CFDs with the following characteristics: SL -10 When the price reaches +8 the SL must pass to BE +1 (SL +1) Thanks for your help. Greetings and good trading.

 

Lock profit after means ( At what point do you want the break even to be initiated.. so if you want;-{ when the prices reaches +8 in profits} then LockPorfitAfter=8;
ProfitLock{is the profit you want the Breakeven to lock for you} if you want it to lock profit at +3.. etc..
then ProfitLock=3;

Good day !!

 
Abubakar Saidu:

i have fixed the problem adding some codes..

your codes...

update the script with this...

add include also

Thanks...

:)

thanks for the fix. :D

 
Leonetrader:

Hi Roni, thank you for facilitating this EA. I am a little neophyte with these experts and I need to know how I can configure an order to operate the DAX CFDs with the following characteristics: SL -10 When the price reaches +8 the SL must pass to BE +1 (SL +1) Thanks for your help. Greetings and good trading.

replied by @Abubakar Saidu

 

Hi Mr.Roni

If i need you help please add the process as in the attached picture?

Thank You


 
Can you modify it manage order with magic number?