Virtual Sl Tp and trailing Sl
This panel brings convenient functionality. It will make your manual or automated trading in the Meta Trader terminal more comfortable.
- This panel allows to hide the Stop Loss and Take Profit levels of your trades. The panel stores these levels in its memory. When the market price reached one of the levels, a trade is simply closed and terminal generates a message indicating that a virtual level was triggered. This feature can be disabled.
- there are 5 options for setting Stop Loss:
- Classic SL - fixed Stop Loss (pips_SL parameter)
- Trailing SL - when the distance from the current price to the trade opening price is greater than the value of the pips_TRSL parameter, Stop Loss is moved by pips_TRSL.
- Breakeven - Trailing SL until the "break even" price - similar to the previous one, but the algorithm works up to the trade opening previous
- Trailing SL "jumps" - when the position profit in pips is equal to the value of pips_TRSL_1, the Stop Loss level is set to the position opening price (to breakeven). If Stop Loss is at "breakeven" and the distance from the current price to the opening price becomes equal to pips_TRSL_2, the Stop Loss order is moved away from the opening price to fix the profit in pips equal to pips_TRSL_3. This Trailing Stop Loss method is very efficient, it has been tested on different strategies. The algorithm is shows on the screenshot below.
- invisible_money_management- false - the Stop Loss and Take Profit levels are output to the market. True - the levels are virtual and you broker "cannot see" them
- all_orders_or_by_magic: All_orders - work with all orders on this symbol. Only_by_magic - work with orders and specific magic, specified in the magic_number parameter
- need_live_sl- true - if invisible_money_management = true, SL levels are set to the market, located away from the virtual SL by pips_live_sl points.
- magic_number- magic number (described above). If it is set to less than or equal to 0, then the EA automatically works with all magic numbers
- color_of_SL- color of the SL line when using virtual SL, TP.
- color_of_SL - color of the TP line when using virtual SL, TP.
- type_of_trailing - type of trailing sl (types are described above)
- pips_TP - distance of the Take Profit level from the trade opening price (specified in pips)
- pips_SL; pips_TRSL_1; pips_TRSL_2; pips_TRSL_3 - values for setting SL and trailing SL (specified in pips; a pip is the minimum unit of price change, integer value, for example: 150 pips on EURUSD with five-digit quotes are 0.00150 on the chart, or 15 points)
If the virtual SL/TP levels are enabled and for some reason the connection between the terminal and broker is lost (connection interruption, broker not responding or something else), trades will not be closed when those levels are reached