Any great idea about HEDGING positions welcome here - page 9

 
Seyedmajid Masharian:

what is the problem

Feed the Freakshow.

 
Seyedmajid Masharian:

it doesn't open any trade with 1st set file?

what is the problem

For "New LongPipRuns TryB_with MaxLevel.mq4" use set file 

  • 10k-92k 08.2015-14.2018 65%DD.set (for GBPUSD)


For "New LongPipRuns TryC_with MaxLevel.mq4" use set files

  • 25k-35k 08.2013-08.2018 20%DD--EURUSD.set
  • 25k-60k 08.2013-08.2018 35%DD--USDJPY.set

 
Funmilola Mabel Odjo:
The proponents and opponents of hedging as a strategy, or part of a strategy all have valid points. More convincing are Fernando's and Keith Watford's argument that hedging is unnecessary and counterproductive. Those names are Heavy Weights (I bow with respect) in the game so better heed to their words of wisdom.

While I do not agree with you (Seyedmajid Masharian) on a number of your positions on the current topic (like not willing to share any of your strategies or ideas but wanting to grab from others...thats not cool at all, that's neither good nor fair really).

Nevertheless, I present here 2 "hedging" strategies or ideas that have so far, with precaution, worked for me, but far from perfect, I must admit (hence will welcome further ideas for improvement of these strategies):


1. Manual Hedge/Recovery Strategy (MHR), and

2. an automated Consecutive Hedge-Unhedge Strategy (or LongPipRuns as named in my resulting EA)

1. MHR: As example: Following one of my trading rules and entry signals from a primary strategy (>95% confluence of fib retracement PLUS several MAs price rejects PLUS S/R levels all on multiple timeframes PLUS a few prince action PLUS round price levels), I go long at say 1.25000 entry level. But price move against me to a predefined virtual stoploss 50 pips below. I simply hedge the trade at that level, and allow the market to proceed until I get another stronger signal (in same direction as previous signal) from the primary strategy. While hedge is on and on new signal and current level is below hedge entry level, I go new long, and close the hedging trade with a profit. The resulting 2 long trades I typically close with a profit or worst case on breakeven, but still leaving me with a profit from the closed hedging trade. I must emphasise that here that the success depends heavily on the primary strategy's signal (the confluences mentioned).

2. The LongPipRuns Strategy: I have attached the EA with 3 years backtest result for GBPUSD, EURUSD and USDJPY, all tested using real tick data (using Tick Data Suit TDS) with 99.9% modelling quality with variable spreads and slippages. The settings are also attached. Results are not bad, but could be better, and proves that hedging can still make profits if used ingenously. The strategy itself is not ideal, I must admit. Yes there will be losses from paying double broker commissions but if my PnL grows to satisfaction at the end of the day, I m just fine with that.

Please note also that the EA code is a working version, from a trove of other semi-abandoned EAs I worked on for a global hedge fund a while ago, hence forgive my disorderliness in the code writeup. Hopefully someone here on the forum would add more ideas, rework and perfect the strategy as well as clean up the code or rewrite a new one professionally. The code is only a "work-in-progress", hence not yet polished, but works just fine.

EA description and procedure:

a. Enter Buy#1/Sell #1 simultaneously. Price may go up or down, we dont know at this point.

b. If price goes up by variable Step (75 pips for example), close Buy #1 and keep its profit in a pseudo-bank. Then enter another set of new Buy #2/Sell #2 simultaneously with a slightly higher lot that Buy #1/Sell #1. Note that we dont close Sell #1 yet. Now we have 3 active trades, Sell #1, Sell #2 and Buy #2. Now our target if for the price to go down.

c. If price reverts down to Buy#1/Sell #1 entry levels, close all trades. Our net profit is the earlier closed Buy #1 in the pseudo-bank.

c. If however, price goes up again by Step, close Buy #2, and send its profit to the pseudo-bank (so we now have Buy #1 and Buy #2 profits in pseudo-bank). Again, we enter a new Buy #3/Sell #3 trades simulatenously, with a slightly higher lot that Buy #2/Sell #2. Now we have active trades Sell #1, Sell #2, Sell #3 and Buy #3.

d. If price reverts down to Buy#2/Sell #2 entry levels, close all trades. Our net profit is the earlier closed Buy #1 and Buy#2 profits in the pseudo-bank, MINUS Sell #1 loss. The result is a good profit given that Sell #1 lot is smaller than Buy #2 lot.

d. etc etc., until there is a retracement to previous entry level or a point where we can close all with overall in profit taking into consideration the amount in pseudo-bank, then repeat again from step a.

See the attached EA files. Tested for GBPUSD, EURUSD and USDJPY. Still need to be optimised for these and other instruments.

Comments and further hedging ideas welcomed.

Again, I agree with the Heavy Weights here that hedging is redundant, and I think potential line of action could be the following:

a. Developed a newer version of this EA that trades with only the real net values of virtual simultaneous Buy/Sell pseudo-positions. 

b. This strategy as-is is very good for ranging markets on higher timeframes M30, H1, H4. Consequently, apply range-bound market filters (ATR, BB contrition, MAs etc) and time filters to trade within those range.

c. The strategy will also work well for trending markets under the condition that the trend makes at least one 20% retracement within a 500pips stretch. Consequently apply 

d. The strategy should work well at low risk settings for any currency pairs, but need to optimise, optimise and optimise to get best performing settings for different pairs.

Hopefully someone out there will contribute by developing this EA further and sharing the results here (or just PM me). Just remember to give relevant credits if EA useful in any way.



GBPUSD 3yr backtest snapshot


USDJPY 3yr backtest snapshot


EURUSD 3yr backtest



I'd like to ask a couple of questions about this one


1- Why did you test only 3 years

2- Do i see no losses at all? I seen many linear curves like this one but sometimes the strategy is curve fitting and sometimes its because the EA works in a certain period of time then starts giving bad results


thanks in advance 

 
I did no
CrisZind:


I'd like to ask a couple of questions about this one


1- Why did you test only 3 years

2- Do i see no losses at all? I seen many linear curves like this one but sometimes the strategy is curve fitting and sometimes its because the EA works in a certain period of time then starts giving bad results


thanks in advance 

I did not look at the code, but considering the back test charts, it is some sort of *sure fire* system. It will work anytime for any period.

The start deposits are chosen as such at this deposit level there would not be a stop out / margin call during the tested period. Would it be lower the sure fire will turn to a sure fail.

There is the catch.

 
Enrique Dangeroux:
I did no

I did not look at the code, but considering the back test charts, it is some sort of *sure fire* system. It will work anytime for any period.

The start deposits are chosen as such at this deposit level there would not be a stop out / margin call during the tested period. Would it be lower the sure fire will turn to a sure fail.

There is the catch.

the deposit level if this means the amount in $ deposited, there is nothing fancy about it, 4000$ thats a big start, or maybe i misunderstood something


but i see the LOT size can go crazy though, 700+ LOTs if its same lot size each time except for the hedge and it would still gives then i assume it's interesting

 
CrisZind:

the deposit level if this means the amount in $ deposited, there is nothing fancy about it, 4000$ thats a big start, or maybe i misunderstood something


but i see the LOT size can go crazy though, 700+ LOTs if its same lot size each time except for the hedge and it would still gives then i assume it's interesting

4k for the first, for other pairs 4k would bust the account.

The strategy posted does *hedge*, albeit the fake type, but the main principle is the lot size increase. A million dollar account would not be enough to sustain over time.

 
CrisZind:


I'd like to ask a couple of questions about this one


1- Why did you test only 3 years

2- Do i see no losses at all? I seen many linear curves like this one but sometimes the strategy is curve fitting and sometimes its because the EA works in a certain period of time then starts giving bad results


thanks in advance 

1. I think the market events of the past 3 years offer preliminary views of general market behaviour: taking the EURUSD as example, the prolonged trending market at first part of 2015, followed by  the range-bound markets of 2016, and then breakout/trending of May-Dec 2017. Also, discrete events such as those of June and Nov. 2016 are well captured within the test range. For some strategies, 3 years good backtest is just enough, while for others at least 10 years. I wount accept as valid a 3 years backtest for a strategy that opened 30 positions in total, as an example. But more importantly, as mentioned earlier, the EAs are still work in progress: they were deprioritised to focus on more profitable works, hence yet to go through rigorous in-house backtesting procedures. And part of this procedures involve using 3 layers of backtest range to minimise uptime on non-performing EAs development: 1st layer Backtest Jan2017-CurrentDate2018; if satisfactory, do 2nd layer with increase test range Jan2015-CurrentDate2018, if satisfactory do 3rd layer Jan2010-CurrentDate2018. As it stands, the EA is in the second test layer.

2.  "...sometimes its because the EA works in a certain period of time then starts giving bad results"... well, thats a possibility. The EA is presented not as a perfect solution but as crude (not crude oil) hedging idea, potentially necessitating further infusion of novel ideas to elevate its current performance level. There's definitely no curve fitting here. The source code is provided for perusal. Again, yes, it may fail for dates before the backtest dates presented if the given set files are used. Hence my emphasis on the need to optimise and determine best sets that works for all historical period matching ones trading style (3, 5, 10 or even 20 yrs...?).

"...Do i see no losses at all?..." The strategy is such that it offers no loss...cough cough!!!...:)  But really, from the description, it shouldnt offer any loss unless you get margin-called due to insufficient account balance, in part due to inadequate settings.

 
Enrique Dangeroux:

4k for the first, for other pairs 4k would bust the account.

The strategy posted does *hedge*, albeit the fake type, but the main principle is the lot size increase. A million dollar account would not be enough to sustain over time.

True. For some pairs, 4k would burst the account even using the minimum broker lot.

Again, not a perfect ready-to-go-live system. Optimisations are still required to determine best operating parameters (min start deposit, start lot, step, etc etc). Also with ranging/trending market filters in place, I think there are potentials for the EA.

 
Funmilola Mabel Odjo:

True. For some pairs, 4k would burst the account even using the minimum broker lot.

Again, not a perfect ready-to-go-live system. Optimisations are still required to determine best operating parameters (min start deposit, start lot, step, etc etc). Also with ranging/trending market filters in place, I think there are potentials for the EA.

Good job Funmilola Mabel Odjo

thanks for sharing

 
Funmilola Mabel Odjo:

True. For some pairs, 4k would burst the account even using the minimum broker lot.

Again, not a perfect ready-to-go-live system. Optimisations are still required to determine best operating parameters (min start deposit, start lot, step, etc etc). Also with ranging/trending market filters in place, I think there are potentials for the EA.

Did you modify anything at all in the strategy itself "not the deposit" to make it work with other pairs, or in a different way, does the strategy work for all three pairs as a "hedging strategy" + other buy/sell entry rules for all three pairs?