Looking For MT5 EA That Helps Me To Set TP, SL and BE Automatically

 

I'm looking for Expert Advisor for MT5 that can help me:

1. to set tp, sl automatically (which my tp and sl are always fixed, like when I set limit, tp & sl will always be 100pips)

2. change my sl to entry point (breakeven) when some conditions triggered (when order running between utc 1400 to 1600, and running profit at certain amount while not hitting tp yet)

(Add On: Im looking for free one!!)

Thank you

 

-------------------------

How to make a search on the forum/Market/CodeBase
https://www.mql5.com/en/forum/193510

MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
MQL5 Source Code Library for MetaTrader 5
 
Sergey Golubev #:

-------------------------

How to make a search on the forum/Market/CodeBase
https://www.mql5.com/en/forum/193510

i will check this out, thank you
[Deleted]  
JinQuan 777:

I'm looking for Expert Advisor for MT5 that can help me:

1. to set tp, sl automatically (which my tp and sl are always fixed, like when I set limit, tp & sl will always be 100pips)

2. change my sl to entry point (breakeven) when some conditions triggered (when order running between utc 1400 to 1600, and running profit at certain amount while not hitting tp yet)

(Add On: Im looking for free one!!)

Thank you

what is this, is it an EA. or Indicator
 
@Nicole Kingsley #what is this, is it an EA. or Indicator
Obviously EA! Indicators can't carry out trade functions.
 
Nicole Kingsley #:
what is this, is it an EA. or Indicator
Ya, looking for EA
I have it for MT4, but cant find MT5 version.

It is something like:
If I place order for XAUUSD at 3900.00, and i set "auto BE" when price reaches profit at 40pips, it will auto move my SL to BE (entry price) when actual price reaches 3904.00
 

Hi

Based on the description I think it’s typical break-even function move SL to BE when trade reach chosen profit.

If you know how to code even a little bit you can try to make it yourself. Brek even function might look like that:

void breakEven() {

   for(int i=PositionsTotal()-1;i>=0;i--){ // returns the number of current positions
      if(m_position.SelectByIndex(i))  {   // selects the position by index for further access to its properties
         if(m_position.Symbol()==_Symbol && m_position.Magic()==0){ //choose only manually opened trades on current symbol
            double ts=0;
            bool   trail=false;
            if(m_position.PositionType()==POSITION_TYPE_BUY && (SymbolInfoDouble(_Symbol, SYMBOL_BID)- m_position.PriceOpen()) >= breakEvenStart*_Point) {
              ts=norm(m_position.PriceOpen()+ breakEvenDistance*_Point);
              if(ts>m_position.StopLoss()) {
               trail=true;
              }
             }
         
            else if(m_position.PositionType()==POSITION_TYPE_SELL && ( m_position.PriceOpen() - SymbolInfoDouble(_Symbol, SYMBOL_ASK)) >= breakEvenStart*_Point) {
              ts=norm(m_position.PriceOpen()- breakEvenDistance*_Point);
              if(ts<m_position.StopLoss() || m_position.StopLoss()==0) {
               trail=true;
              }
            }        
             if(trail && norm(m_position.StopLoss()-ts)!=0) {
               m_trade.PositionModify(m_position.Ticket(), norm(ts), m_position.TakeProfit()); // close a position by the specified symbol
                  
            }
         }
      }  
   }
}

Best Regards

 
Marzena Maria Szmit #:

Hi

Based on the description I think it’s typical break-even function move SL to BE when trade reach chosen profit.

If you know how to code even a little bit you can try to make it yourself. Brek even function might look like that:

Best Regards

I dont know about coding, but i will check this out, thank you!