PacMan (my first hybrid) - page 32

 
currymonster:
The EA is on post #249

I'll be putting an updated version of JR on the first post soon. I posted that one to see some results from others.

Doing a couple tweeks now.

Dave

 
xxDavidxSxx:
Can you code that to work in pacman? Dave

Sorry, I don't code I wish. You should be able to get Hedge code from another EA like Firebird 3.2 or others. Hope to see a tweaked PMjrGBP$ With some sort of safety net like I mentioned

 
matrixebiz:
...if you have a trade open TP=15 SL=125 and a Hedge order to open if price goes wrong pipstep=30 at TP=120 SL=50 then if price goes totally wrong and looses, well Hedge would have closed and you really only had a loss of 5pips instead of 125. I've worked out a few scenarios with this setup and can't really go to wrong.

Have you tried to simulate these scenarios in EXCEL? I don't think this will work out the way you see it. The trend usually reverses after such a long run. I'm not criticizing, but trying to come up with a good hedge algorithm for martingale systems.

The way I see this is:

1. You open a trade (TP=15, SL=125)

2. The price goes against you 30 pips - you kick in the hedge order

3. Your SL 125 is hit and the trend reverses (you are now 125 pips behind)

4. You are left with an open hedge order (it should be +95 pips ahead)

5. What do you do?

a. close the hedge (-125 + 95 = -30 pips)

b. let the hedge run??? (-125 +/- ?pips )

- when do you close the hedge? (do you open a hedge for the hedge?)

However if all goes well and the price keeps going for another 25 pips

you will be only -5pips behind, which is good if your stomach can take it.

This will of course only work if you hedge every order of the martingale progression.

Please let me know if I got this the way it was intended.

 

You mean you setup a hedge order at the same time as the original order?

i.e. buy 0.1 lot + sell 0.1 lot (both at market price?).

 
nix:
Have you tried to simulate these scenarios in EXCEL? I don't think this will work out the way you see it. The trend usually reverses after such a long run. I'm not criticizing, but trying to come up with a good hedge algorithm for martingale systems.

The way I see this is:

1. You open a trade (TP=15, SL=125)

2. The price goes against you 30 pips - you kick in the hedge order

3. Your SL 125 is hit and the trend reverses (you are now 125 pips behind)

4. You are left with an open hedge order (it should be +95 pips ahead)

5. What do you do?

a. close the hedge (-125 + 95 = -30 pips)

b. let the hedge run??? (-125 +/- ?pips )

- when do you close the hedge? (do you open a hedge for the hedge?)

However if all goes well and the price keeps going for another 25 pips

you will be only -5pips behind, which is good if your stomach can take it.

This will of course only work if you hedge every order of the martingale progression.

Please let me know if I got this the way it was intended.

"3. Your SL 125 is hit and the trend reverses (you are now 125 pips behind)"

but I had Hedge TP at 120 so when my SL of the original order of 125 was hit, Hedge already closed at TP=120 so I'm not actually behind anymore of 125, I'd be only down -5, right?

Also David, with the right settings in FB32 signals are accurate (see forward test pics) but I have some questions that I can't seem to get answered about it. So, I don't know if you can take the edge code from it?

 
nix:
You mean you setup a hedge order at the same time as the original order? i.e. buy 0.1 lot + sell 0.1 lot (both at market price?).

No, sorry I was wrong, I meant to set TP of Hedge to 90. Then if original order SL was hit, then Hedge TP would have been hit so then your only at a loss of 35

 

Ok. Now it makes sense if the trade goes against you, but what is your scenario when the price action triggers the hedge order, reverses (i.e. whipsaw) and keeps going? You take a -50 pip loss on the hedge and +15 profit on the original order?

 
nix:
Ok. Now it makes sense if the trade goes against you, but what is your scenario when the price action triggers the hedge order, reverses (i.e. whipsaw) and keeps going? You take a -50 pip loss on the hedge and +15 profit on the original order?

yes, that is right, keep away from high volatile currencies:) Worst case , but you see I'm still only in the hole 35 pips but what if you set a TS on the Hedge

if no TS on Hedge, I have Hedge SL higher than original order TP a bit just in case TP of original order is hit but price decides to go back down before SL of Hedge is hit, I'm still in hopes that TP of Hedge might get hit. If you have a proper EA in that signals are 80+ accurate like the one I'm using then Hedge might not even need to open. I have alot more thinking on this and with different scenarios. There has to be a way to be protected from to much wipshaw,

as you can see by my pics above, I seem to have almost 100% accurately with its TS working it rarely looses but when it did once I don't think Hedge opened to cut my loss see atached;

Doesn't look like Hedge opened when this order went wrong;

580814 2007.05.07 21:39 buy 0.10 euraud 1.6423 1.6229 1.6442 2007.05.10 08:50 1.6229 -0.10 0.00 0.00 -16.16

I'm trying to test this week if I set MaxTrades to 1 will the EA still allow Hedge to open. If I set Maxtrades to 2, 2 new orders might open then Hedge can't open now again. Not sure.

 

How to hedge martingale trades?

We are finally discussing hedging strategies again.

I previously claimed that to cure the poison of exponentially growing losses, we need a medicine that generates exponentially growing profits.

My proposal is to use the mirror image of a martingale trade, the pyramiding trade. A combination of a martingale and a pyramiding trade built such that the winners are not damaged too much and the max loss is reduced could be the key.

Enclosed you find a simulation of such a combined trade in Excel.

A martingale trade with 5 levels is used where we have ~90% win probability.

The hedge starts building up opposite pyramiding orders after level 3.

What's the use of it?

If you had set a stop loss at level 7, a loss of -200 would be hit. If we add the hedge, our max loss would be at -135 and we still have some probability of getting away much cheaper.

What's the price?

We get a slightly lower win expectation value and a higher probability that we must take some loss below max loss, but the win probability is roughly retained.

Note that the hedge orders would be placed as limit orders. A sharp price spike can help us reaching breakeven when the pyramiding trade fully compensates the martingale trade.

You can simulate any situation you like with this spreadsheet, as long as both the martingale and pyramiding trades use the same pipstep and TP settings. Try building your desired risk profile ...

Regards, alassio

 

Thanks for posting the spreadsheet. I'll need some time to dig into it.

A while back I did a lot of calculations and simulations regarding hedging of martingale trades and I agree with you that exponentially growing losses need to be hedged by exponentially growing profits. We must also clearly define a reasonable loss, which seems to be mandatory.

Surely we need to control the drawdown of martingale trades gone wild, but we must also remember that the key issue here is getting out of the endless straddle, where the distance between profit and equity keeps growing until margin call.

The algorithm in Pacman, Goblin, etc. seems great but it lacks something - there are times where this approach fails and when it does it fails BIG .

Maybe we should concentrate on the following simple building block:

2 equal trades (BUY and SELL) - pip distance between the two = 30 pips

What is the best exit strategy?

Reason: