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

 
How about possibility to set parameters in $, not in pips?
 
inet200:
How about possibility to set parameters in $, not in pips?
It's possible, but i think it would be better let it in pips. Because almost all SL calculations is based on pips. You just need to manage your lot risk.
 
RoNz:
It's possible, but i think it would be better let it in pips. Because almost all SL calculations is based on pips. You just need to manage your lot risk.
Implement both options, in pips and in $. Would be the best :)
 

Thanks for a really good EA! I used it for scallping. I have a question: during using Your EA I observe some problem with position: TrailingStop=X and TrailingStep=Y, like at the picture. Could Yu help me?


Pips settings by EA

 
paff2:

Thanks for a really good EA! I used it for scallping. I have a question: during using Your EA I observe some problem with position: TrailingStop=X and TrailingStep=Y, like at the picture. Could Yu help me?



It should work like as seen in pic. Lock profit is the first priority. Try to disable locking profit to do the question in your image.
 

Hay Ron, great stuff.

Can you make 'silent' TS and also make it so that i can choose how much pips behind i want to trail (even if i have limit of minimum 15 pips with my broker or MT4).

I tried to do it by modifying one EA but i'm not that good programmer. My idea was not to modify orders TS cause in that way i can't set it bellow 15 pips,

but rather to track the difference between current price and entry price and if it gets larger than my TS i would set 'comparing price'=current-/+TS    (+/- depends if it's bid/ask)

and when difference gets bigger so does the 'comparing price' move. Once the price goes against us and current price and 'comparing price' are equal then the program would 

close order. In this way no TS would be set by the program so it also would be invisible.thanx 

 
tvargek:

Hay Ron, great stuff.

Can you make 'silent' TS and also make it so that i can choose how much pips behind i want to trail (even if i have limit of minimum 15 pips with my broker or MT4).

I tried to do it by modifying one EA but i'm not that good programmer. My idea was not to modify orders TS cause in that way i can't set it bellow 15 pips,

but rather to track the difference between current price and entry price and if it gets larger than my TS i would set 'comparing price'=current-/+TS    (+/- depends if it's bid/ask)

and when difference gets bigger so does the 'comparing price' move. Once the price goes against us and current price and 'comparing price' are equal then the program would 

close order. In this way no TS would be set by the program so it also would be invisible.thanx 

Nice idea. I'll try to find the algorithm for this option.
 

here is my modified EA but it's not working always...i think it needs some sort of resetting ...maybe it can be of use to you

 

extern int    TakeProfit       = 100;        
extern int    StopLoss         = 20;
extern int    Trailing     = 3;           


int init()
  {
//----
  
 
//----
   return(0);
  }

int deinit()
  {
//----
   
//----
   return(0);
  }

int start()
  {
  
  
 Comment("     " ,AccountName(), "              ACCOUNT  ",AccountNumber(),"            PROFIT  ",AccountProfit(),  "           FREE MARGIN  ",AccountFreeMargin(),  "             TOTAL  ",OrdersTotal(), "          EQUITY  ",AccountEquity(), "            BALANCE  ",AccountBalance());
  


  
int Magic=0;
double TrailingPrice=0;
int PriceSwitch=0;
  
for(int cnt=0;cnt<OrdersTotal();cnt++)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if( OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)        
        {
         if(OrderType()==OP_BUY)
           {
            if(Bid-OrderOpenPrice()>=TakeProfit*Point|| OrderOpenPrice()-Ask>StopLoss*Point)
              {
               OrderClose(OrderTicket(),OrderLots(),Bid,0,CLR_NONE); return(0);
              }
            if(Trailing>0)//  HERE IS MY VERSION OF SILENT TS
              {
               if((Bid-OrderOpenPrice())>(Point*Trailing))
                 {
                  if(TrailingPrice=0)
                     {
                     TrailingPrice=OrderOpenPrice();
                     }
                   if((Bid-(Point*Trailing))>TrailingPrice)
                     {
                     TrailingPrice=(Bid-(Point*Trailing));
                     }
                   if((Bid-(Point*Trailing))<TrailingPrice)
                     {
                     OrderClose(OrderTicket(),OrderLots(),Bid,0,CLR_NONE);
                     TrailingPrice=Ask;
                     return (0);             
                     }
                 }
              }
           }
         if(OrderType()==OP_SELL)
           {
            if(OrderOpenPrice()-Ask>=TakeProfit*Point|| Bid-OrderOpenPrice()>StopLoss*Point)
              {
               OrderClose(OrderTicket(),OrderLots(),Ask,0,CLR_NONE); return(0);
              }
            if(Trailing>0)//  HERE IS MY VERSION OF SILENT TS
              {
               if((OrderOpenPrice()-Ask)>(Point*Trailing))
                 {
                  if(TrailingPrice=0)
                     {
                     TrailingPrice=OrderOpenPrice();
                     }
                   if((Ask+(Point*Trailing))<TrailingPrice)
                     {
                     TrailingPrice=(Ask+(Point*Trailing));
                     }
                   if((Ask+(Point*Trailing))>TrailingPrice)
                     {
                     OrderClose(OrderTicket(),OrderLots(),Ask,0,CLR_NONE);
                     TrailingPrice=Bid;
                     return (0);             
                     }
                 }
              }
           }
         }
       }


  return(0);
}
 
Thanks tvargek. This could be useful. Unfortunately it will not works if there is more than one trade. You should add array contains TrailingPrice for each opened orders.
 

like i said..i'm not that good :|

it seems to work with sell but not with buy...