Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Script | Sell with Buy Stop Hedge for chart symbol / Buy with Sell Stop Hedge for chart symbol

MetaTrader Experts, Indicators, Scripts and Libraries

It has been over two yeas I don't use  stop orders much.

Instead of placing Stop Loss orders, I use hedged pending orders.

I use this scripts often in my trading with keyboard shortcuts ALT+B vs ALT+S, so I think is useful enough to share this scripts with you.

MetaTrader Experts, Indicators, Scripts and Libraries

#property copyright     "Copyright 2024, MetaQuotes Ltd."

#property link          "https://www.mql5.com"

#property version       "1.01"

#property description   "persinaru@gmail.com"

#property description   "IP 2024 - free open source"

#property description   "Buy with Sell Stop Hedge for chart symbol"

#property description   ""

#property description   "WARNING: Use this software at your own risk."

#property description   "The creator of this script cannot be held responsible for any damage or loss."

#property description   ""

#property strict

#property show_inputs

#property script_show_inputs

extern int    Distance           = 20 ;

extern int    TP                 = 0;

extern int    SL                 = 0;

extern int    TP_Stop_ORD        = 0;

extern int    SL_Stop_ORD        = 0;

extern double Lot                = 0.10; 

//01.00 = 1 Standard Lot $100.000

48893