R.F.I.U. #1 – Upside & Downside Break

Routines For Industrial Use

Upside / Downside hedgers

The two routines below are two different EAs.

They were made to be the first line of defense. They are made with the intention of “catching a fall”.

Sophisticated usage would include:

– closing out the positions partially to avoid re-hedge i.e. leaving a micro lot open (if you want to avoid being re-hedged for some reason)

– working towards the last 16 (or your setting) sample low/high: closing out the hedge / position towards the last low/high knowing, that 4 pips (or your setting) later the hedge would be re-instated automatically

– remembering that there is no reason to close out the hedge before the wind changes

They work on the current time frame; you would need two separate windows, both with the pair you are trading on and in the chosen time frame. You can define hot keys for them or peg ’em from the navigator window. (Place the extracted files in the active Experts folder, where you can pull them from. For indexing, you may need to restart your MT4 first.)

They are set by default to be monitoring for 16 sample highs/lows and put out a full hedge / a half hedge (based on MACD wind) at 40 points / 4 pips displacement, constantly monitoring for your current position size difference.

They are deleting and replacing the orders every 1800 seconds or when your discrepancy between the longs and shorts changes.

Intended use 1h or 30 min. Remember, 16 sample of 30 minutes equals 8 sample of the 1h.

0_Downside_Protection_MACD

0_Upside_Protection_MACD

For further nuances, the MACD is a 30-minute one and has, 48, 104, 9 settings. We monitor for the difference based on the previous, not the current 30 minute’s readings.

The reason for 1/2 hedge is that you are trying to pee against the wind. Might work for a bit and yield you something before becoming a liability.

You can also see on the pending order list if the hedging size changes – for the wind just turned.

The above two routines are posting orders only when price is within 50 pips of their sell/buy stop.

 

Don’t forget to allow for the Comment fields to show on the order list. Makes for easier reading.

 

comment

 

 

.