Hedge saved you, who will save Hedge ? - page 17

 
Ahmad Zuhairdi Noh:

Ha., what happens if "last chance" is still trolling you? I know you want to avoid using an indicator by why don't you try Bollinger bands gradient? It works like charm for me at least for now. 

That's the whole point of the hedge strategy, knowing what to do when the "last chance" fails. When that is solved, the EA will be ready.

I am already using a few indicators, not only on the final trade, but on all of the trades. I don't open hedges/averaging trades blindly. The EA will decide if it is better to use hedge (opposite trade) or averaging (same type of trade) based on indicators.

I am currently using moving average (lagging indicator) and a custom made indicator (leading indicator) based on price volatily and volume, which tries to predict reversals.

I've also tried bollinger bands, but I don't think it works very well on renko charts (I use a custom renko type). I am trying a few other options, like MA applied to WPR - William's Percentage Range (which I like very much).


Beyond that, I am trying a new approach, but it is hard to think of a way to code it:

Each time a new hedge is added, it will add X number of trades on a grid manner with the same lot (for example, if Buy is 0.01, Sell will be 2x 0.01 with some spacing, then Buy 3x 0.01 with some spacing, etc).

Then each trade, acting as a independent trade, can close at a small profit when combined with opposite trades (for example, 2x Sell trades with 1x Buy trade). This way, trades will start to close independently of each other and we dissolve DD on a more "soft" manner, if you know what I mean.

PS- English is not my main language, sometimes I can't find the correct words to explain what I mean.

 
Icham Aidibe:

Margin. It won't open a third one to preserve the margin. The new one is a random one.

Yeah, right, Margin. Well, I'm assuming you are dividing the available margin into two. That is why only two trade opened before your margin was depleted. 

Just wondering, why not you make it available to execute more loops. I mean, instead of opening 0.22 at the beginning, maybe you can open a lot lesser than that.

That way, you give your account more space to loop before it cut loss. As far as I know, increasing the loop will increase the rate of closing in profit. 

But, I think you must have done that already, isn't it? 

 

Rafael Grecco:

Beyond that, I am trying a new approach, but it is hard to think of a way to code it:

Each time a new hedge is added, it will add X number of trades on a grid manner with the same lot (for example, if Buy is 0.01, Sell will be 2x 0.01 with some spacing, then Buy 3x 0.01 with some spacing, etc).

Then each trade, acting as a independent trade, can close at a small profit when combined with opposite trades (for example, 2x Sell trades with 1x Buy trade). This way, trades will start to close independently of each other and we dissolve DD on a more "soft" manner, if you know what I mean.

PS- English is not my main language, sometimes I can't find the correct words to explain what I mean.

Hmmm, I never think of that. I think it's easy to code it.

Your EA just needs to count how many trades have been opened then let the magic number and OrderProfit() do their trick.

However, as usual, the idea is worthless unless it was implemented in a real life. So, you should try it and don't forget to share the results here. 

All I can say is; that's an interesting idea to try.

 
Ahmad Zuhairdi Noh:

Hmmm, I never think of that. I think it's easy to code it.

Your EA just needs to count how many trades have been opened then let the magic number and OrderProfit() do their trick.

However, as usual, the idea is worthless unless it was implemented in a real life. So, you should try it and don't forget to share the results here. 

All I can say is; that's an interesting idea to try.

Hi.

I decided to stay away from coding a few days to try to have some new ideas.

I've been thinking, the problem with hedging/averaging is when we get in a situation that is hard to get out - that is when we have a big lot against us. So the best way to handle this is trying as much as possible not to get in such a situation. Easier said than done.

I decided to try a idea that seems counterintuitive. When a trade fails, instead of deciding between going for hedge OR averaging (which was what my EA was doing), my EA will do both. On a failed trade, my EA will now open a buy AND a sell at the same time, using the same lot size.

If price reverses, the averaging will close the trade, if price continues, hedge will close it - always closing with a profit. Now we have another failed trade and apply the same principle. Because of market behaviour, going up and down, we will most of the time be "safe" on a sense that having both buys and sells at the same time, kind of protect our equity.

To make the whole process more efficient, we shuold consider closing independently all buys at profit (even with sell trades still opened) and vise versa. We should also combine old trades (smaller lots) with new trades (bigger lots), to keep trade zone tight.

Eventually there will be times when trades should be closed at a loss for safety, but overall the system seems very profitable if well made.

After coding hundreds of EAs, this is defintely the most complex and most interesting I have made. As soons as I have some updated results I'll post them.

Ahmad, Icham, do you have anything new to show?

 
Rafael Grecco:

Hi.

I decided to stay away from coding a few days to try to have some new ideas.

I've been thinking, the problem with hedging/averaging is when we get in a situation that is hard to get out - that is when we have a big lot against us. So the best way to handle this is trying as much as possible not to get in such a situation. Easier said than done.

I decided to try a idea that seems counterintuitive. When a trade fails, instead of deciding between going for hedge OR averaging (which was what my EA was doing), my EA will do both. On a failed trade, my EA will now open a buy AND a sell at the same time, using the same lot size.

If price reverses, the averaging will close the trade, if price continues, hedge will close it - always closing with a profit. Now we have another failed trade and apply the same principle. Because of market behaviour, going up and down, we will most of the time be "safe" on a sense that having both buys and sells at the same time, kind of protect our equity.

To make the whole process more efficient, we shuold consider closing independently all buys at profit (even with sell trades still opened) and vise versa. We should also combine old trades (smaller lots) with new trades (bigger lots), to keep trade zone tight.

Eventually there will be times when trades should be closed at a loss for safety, but overall the system seems very profitable if well made.

After coding hundreds of EAs, this is defintely the most complex and most interesting I have made. As soons as I have some updated results I'll post them.

Ahmad, Icham, do you have anything new to show?

Hi Rafael ! How I understand you : that strategy is a real headache ! 

And once it performs well on the tester, here's what I found that matter by analyzing the signal log :  

Forum on trading, automated trading systems and testing trading strategies

MetaQuotes VPS service specification

Icham Aidibe, 2018.05.02 14:27

That's why I want likely a request firewall : 

  • async mode false : req req req ----> req - confirmation or not - req - confirmation or not - req - confirmation or not (server side, queue)
  • async mode true : req req req -----> req confirm or not - req confirm or not - req missed or not
  • firewall : req - wait for confirmation - req - wait for confirm - request wait for confirmation (client side, queue)
Is it right ? I'm not confusing them ? Just that will be enough to clean the log from this asynchronized req, because the new request you highlighted is made when the price has changed and before the server response - i think
After all, isn't it about managing numberous positions as we manage one ?! I'm trying to tame it despacito, poquito a poquito !  ;)
 
Icham Aidibe:

Hi Rafael ! How I understand you : that strategy is a real headache ! 

...

To be honest, if someone told me about that strategy I would think the same.

I guess I don't see it as a mess (or headache) because I've been working on it for some weeks now, I've seen it grow, starting as a simple hedge system and now it's this "monster". But it makes sense to me.

I'll try to post a video of it in action to show a little better how it works.

 
Rafael Grecco:

I decided to try a idea that seems counterintuitive. When a trade fails, instead of deciding between going for hedge OR averaging (which was what my EA was doing), my EA will do both. On a failed trade, my EA will now open a buy AND a sell at the same time, using the same lot size.

If price reverses, the averaging will close the trade, if price continues, hedge will close it - always closing with a profit. Now we have another failed trade and apply the same principle. Because of market behaviour, going up and down, we will most of the time be "safe" on a sense that having both buys and sells at the same time, kind of protect our equity.

To make the whole process more efficient, we shuold consider closing independently all buys at profit (even with sell trades still opened) and vise versa. We should also combine old trades (smaller lots) with new trades (bigger lots), to keep trade zone tight.

Unfortunately, I've tried that too and It doesn't work. I've done exactly as you said a few months ago and it ends up screwing my precious real account (just sharing). 

Why don't you try considering this;

What if we open the hedging or even martingale trade only when we have confirmed the market is moving in one direction (signal from indicator or price action of course).

Which mean as long as the signal for hedging or martingale trade didn't trigger, the initial trade will be left to float.

At the same time, the EA will calculate how much lot is required to counter the trade according to how far the price has moved just in case the signal is activated.

If you are using a high leverage account, this floating won't hurt your account too much and if you are lucky, the market will do a reversal and lead you to a profit.

How do I know? Well... That's my current EA and it's doing a fantastic job so far (I won't put it on the market for sure. lol).

I'm giving you and all who read this -the idea.

Maybe you can come out with something better (I'm sure you will). 

 

Whom took it personally isn't professionnal. That said.

Ahmad Zuhairdi Noh:

Unfortunately, I've tried that too and It doesn't work. I've done exactly as you said a few months ago and it ends up screwing my precious real account (just sharing). 

Why don't you try considering this;

What if we open the hedging or even martingale trade only when we have confirmed the market is moving in one direction (signal from indicator or price action of course).

Which mean as long as the signal for hedging or martingale trade didn't trigger, the initial trade will be left to float.

At the same time, the EA will calculate how much lot is required to counter the trade according to how far the price has moved just in case the signal is activated.

If you are using a high leverage account, this floating won't hurt your account too much and if you are lucky, the market will do a reversal and lead you to a profit.

How do I know? Well... That's my current EA and it's doing a fantastic job so far (I won't put it on the market for sure. lol).

I'm giving you and all who read this -the idea.

Maybe you can come out with something better (I'm sure you will). 

For a regular use it's the most intelligent way to place an hedge. Obviously.

 
Ahmad Zuhairdi Noh:

...

At the same time, the EA will calculate how much lot is required to counter the trade according to how far the price has moved just in case the signal is activated.

...

I like this bit very much. I'll try to put it on my EA. Thanks!

 

Hi there ! 

So from the tester to show off

... the first signal to evaluate (recovery zone : 15+40=55) 

... the second signal (recovery zone : 100+200=300)

I can say that a too short zone works but it ain't feasible due to live constraints (spread, slippage etc ...), and a much more larger zone do work and operates at a rate of approx. +/-3% per day ; +/-90% per month ; +/- 1080% per year (roughly speaking)


So now the idea is to calibrate poquito a poquito the zone size by keeping the ratio of takeprofit/stoploss until the lower limit observed with 15+40=55 pts ; the goal being obviously to get the best cadence supported by this broker (demo) and so on to improve the profit.

Technically talking there's still errors I noticed higher in the logs ( [Position doesn't exist]) but I think it's due to execution, plus it doesn't seems to disturb when the zone is large enough, offsets are likely drowned and therefore remain trivial (in contrast with a short zone, where every points matters). 

154-16-528-122+512+6.50 = 6.50, it's well compensated

EDIT : I find more relevant to keep random entries but avoid unvolatile markets than introducing signals