Disliked{quote} Do you know the principle of the script ? if so, we can code a new.Ignored
How difficult is it to open a locked ex4 file?
IN "Brief"
The hedging script has 11 stages of hedging. But the beauty of the script is that it can read at what ratios the stop loss and take profits are set at.
So if I place a buy order at current market price with a SL of for example 100pips and a TP of 200pips it will pick up the ratio of risk to reward at 1;2. Same said if you open a trade at current market price with a SL of 50pips and a TP of 150pips it picks up that the ratio is 1:3.
The higher the ratio the lower the inclination of the lot size increase per hedge.
Example:
at a risk to reward of 1:2 , sl of 50pips and tp 100pips
1st trade placed buy at 0.02lots sl of 50 and tp 100pips
Attachment g
Then the sell stop order is placed on the stop loss of the first buy orders. ( the jump in lot size to the hedge sell stop is 2.5 times larger than the initial buy) 0.02x2.5 =0.05
Thats sell stop order must also have a tp of 100pips but the SL of the sell stop must meet the TP level of the intial buy order.
Attachment g
If price has to come down and enagage the sell stop into a live sell then a buy stop must be placed on the previous buy at 1.5 times the intial sell order (0.05 x1.5= 0.075 round off to 0.08) that buy stop must have a tp at the same 100pip TP level of the very first buy order ( remember the very first 0.02 buy order) with a SL at the Same price as the TP of the Sell order.
The inclination now of the lot sizes stay fixed at (previous stop order x 1.5) for each new trade. The process is repeated 11 times max. Any third digit after decimal gets rounded up.
first trade buy 0.02 x 2.5 = second trade sell stop @ 0.05 lot
enagaged second trade sell 0.05 x 1.5 = third trade buy stop @ 0.08 lot
engaged third trade buy 0.08 x 1.5 = fourth trade sell stop @ 0.12 lot
engaged fourth trade sell 0.12 x 1.5 = fifth trade buy stop@ 0.18 lot
engaged fifth trade buy 0.18 x 1.5 = sixth trade sell stop @ 0.27 lot
engaged sixth trade sell 0.27 x 1.5 = seventh trade buy stop @ 0.405 lot
engaged seventh trade buy 0.41 x 1.5 = eighth trade sell stop @ 0.615 lot
engaged eighth trade sell 0.62 x 1.5 = ninth trade buy stop @ 0.93 lot
engaged ninth trade buy 0.93 x 1.5 = tenth trade sell stop @ 1.395 lot
engaged tenth trade sell of 1.4 x 1.5 = eleventh trade buy stop @ 2.1 lot
engaged eleventh trade buy is the last position @ 2.1 lot
Buy trade total lots 0.02+0.08+0.18+0.41+0.93 +2.1 =3.72 lots
Sell trade total lots 0.05+0.12+0.27+0.62+1.4 = 2.46 lots
Net buy or long position outweigh sells or shorts by 1.16 net long lots