Experts: Stop Loss Take Profit

 

Stop Loss Take Profit:

If a trade is closed by Stop loss, the volume is doubled; if by Take profit the minimum volume is used. OnTradeTransaction is used to determine whether a trade was performed after the activation of Stop loss or Take profit.

      if(deal_symbol==m_symbol.Name() && deal_magic==m_magic)
         if(deal_entry==DEAL_ENTRY_OUT)
           {
            if(deal_reason==DEAL_REASON_SL)
               ExtLot*=2.0;
            else if(deal_reason==DEAL_REASON_TP)
               ExtLot=m_symbol.LotsMin();
           }

Author: Vladimir Karputov

 

Hi.


I see that the stop loss and take profit are set automatically. :)


But the expert executes positions automatically on live data. This is not what I want to achieve however. I like that the stop loss and take profit are set automatically on the execution of the position, but I want to execute positions manually. There are not such experts for MetaTrader 5 unfortunately. :( If you can add sub-pips to the code, I would be really happy ( 100 sub-pips = 10 pips ). After the manually execution of a position, nothing happens to the levels of stop loss and take profit.


I'm willing to pay you $100 if you can make this code for me. :)


I don't know which way is best to pay with, but I'm sure you can give me a solution. :D




Best regards,

Johannes Hillestad Baumann

 

Ohh!


I forgot to mention that the expert has to work on all charts that are loaded. There is only the need to insert one expert. This is important.


Thanks.




Best regards,

Johannes Hillestad Baumann