stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Martingale with "low" margin hit
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=179
Page 4 of 12
Author:  Alpenkorps [ Mon Dec 26, 2011 2:38 am ]
Post subject:  Re: Martingale with "low" margin hit

spyderman wrote:
The reason the multiplier is usually 2 is that the SL is twice the TP. I don't see how you're TP can be equal to your SL in a martingale buy/sell arrangement like we're discussing. To accomplish that you're buy and sell would be at the same price. :?

Like in your London example. You place a PBSO 10 above and a PSBO 10 below. If your TP is 50 above/below the entries that's typically where your sl's are too. So your SL is 70 and your tp is 50. If you divide 70 by 50 that gives you a multiplier of 1.4. You have to increase lots size by that amount on each cycle in order to break even at your TP. In your example, you hit your buy for 1 lot. Price reverses and you hit your sell for 1.4 lots. Price continues and hits your TP. You have 1.4 lots @ 50 pips for 70 pips and 1 lot @ -70 pips. To make a profit you have to increase your lot size above the 1.4. The lower you can keep that multiplier the longer you can stay in the cycle.
In the example I provided, My SL was 20 pips, SL=Grid/Box size. I don't hold the opposite trade to the TP, I take the loss. Its much better than carry all trades to the TP (in my calculation), it requires less lot multiplier, saves a lot of margin. I would like to get your opinion on this. Thanks man.
Author:  spyderman [ Mon Dec 26, 2011 3:40 am ]
Post subject:  Re: Martingale with "low" margin hit

Alpenkorps wrote:
In the example I provided, My SL was 20 pips, SL=Grid/Box size. I don't hold the opposite trade to the TP, I take the loss. Its much better than carry all trades to the TP (in my calculation), it requires less lot multiplier, saves a lot of margin. I would like to get your opinion on this. Thanks man.
Alpen,

I've run through some calcs and I think you're dead on. I can't see any reason to not close out the losses at the taking of the opposite trade. The way I figure using my 75 TP with a 25 spread between orders we could use a 1.3333 multiplier and still get our 75 pips when we eventually hit TP.

Thanks for the input. :)
Author:  spyderman [ Mon Dec 26, 2011 3:43 am ]
Post subject:  Re: Martingale with "low" margin hit

Khalaad wrote: You were perhaps sarcastic; I am going to be downright rude. Please forgive me; we have a choice of:
being wise and learning from someone's elses mistake;
being ordinary and learning from our own mistakes; or
being foolish and not learning at all.

Khalid

No worries...reminds me of another saying.
You learn from your mistakes ... but only a fool learns everything that way.
I'll try not to be a fool with this. Thank goodness for demo's
Author:  spyderman [ Mon Dec 26, 2011 4:00 am ]
Post subject:  Re: Martingale with "low" margin hit

Does anyone know of an indicator you could throw on a chart that would identify the longest period that a pair traded in a given range. Maybe it would highlight a box around the range. This would be useful in identifying which pairs have historically ranged enough to create a critical drawdown.
Author:  Alpenkorps [ Mon Dec 26, 2011 4:00 am ]
Post subject:  Re: Martingale with "low" margin hit

spyderman wrote:
Alpen,

I've run through some calcs and I think you're dead on. I can't see any reason to not close out the losses at the taking of the opposite trade. The way I figure using my 75 TP with a 25 spread between orders we could use a 1.3333 multiplier and still get our 75 pips when we eventually hit TP.

Thanks for the input. :)
Hey man, Thanks to you too.
I didn't understand it though .. which method is better in your opinion? Close the losers at the taking of the opposite trade or not? Pardon my limitation of understanding plain English ..
Author:  Alpenkorps [ Mon Dec 26, 2011 4:03 am ]
Post subject:  Re: Martingale with "low" margin hit

spyderman wrote:Does anyone know of an indicator you could throw on a chart that would identify the longest period that a pair traded in a given range. Maybe it would highlight a box around the range. This would be useful in identifying which pairs have historically ranged enough to create a critical drawdown.
I use 30 days range, to be safe, I multiply it with 1.5 or 2 based on pairs.
Author:  spyderman [ Mon Dec 26, 2011 4:19 am ]
Post subject:  Re: Martingale with "low" margin hit

Alpenkorps wrote:
spyderman wrote:
Alpen,

I've run through some calcs and I think you're dead on. I can't see any reason to not close out the losses at the taking of the opposite trade. The way I figure using my 75 TP with a 25 spread between orders we could use a 1.3333 multiplier and still get our 75 pips when we eventually hit TP.

Thanks for the input. :)
Hey man, Thanks to you too.
I didn't understand it though .. which method is better in your opinion? Close the losers at the taking of the opposite trade or not? Pardon my limitation of understanding plain English ..
I think it will keep our multiplier lower to close the losers when taking the opposite. And your English seems fine to me. ;)
Author:  garyfritz [ Mon Dec 26, 2011 5:21 am ]
Post subject:  Re: Martingale with "low" margin hit

spyderman wrote:Sorry I'm a little confused on the correlation between your previous system and a straight martingale system. Are you saying the system you were using, whether it was MA crosses, BB bands, RSI had a 50% win rate and then the martingale kicked in?
No, I took an existing system that happened to have an 80% win rate, but the W:L ratio was small. Small W:L doesn't work well with Martingale. I modified the W:L ratio to something closer to 1:1. That lowered the win% to about 50%. That was the first equity curve I posted.

Then I changed the simple fixed-position-size code that I test with, to a Martingale that doubled the position size after each loss. That produced the second equity curve.

==

I enhanced my spreadsheet to calculate exit strategies. I looked at exiting anywhere from the last entry point to the TP exit. (E.g. imagine the situation where you go long, then go short, then have to bail out of the trade -- I looked at exiting anywhere from the go-short price to the long TP.) Exits close to the entry point *would* have the best expectancy, except by placing the exit close to the entry you're going to hit it a lot of times that might have ended up hitting the short TP. That changes your win %.

And that's critical. The "how often do you hit the TP before reversing and adding another position" percentage is a crucial variable. In my simulations, if you hit the TP about 30% of the time, it breaks even. Anything above that has a chance of being positive, depending on some other parameters.

And I have absolutely no idea what the "TP before reversal" % is. I'll have to backtest it to determine that.

Assuming I have my spreadsheet right, and assuming the "TP before reversal" % is at least 35-40% or so, this appears to be a winner. It's not a HUGE winner. E.g. if it breaks out 35% of the time, and you bail at the midpoint between the buy/sell points, you can bail after putting on 4 positions and average about 17 pips per trap. You'll generally make about 42-47 pips when you hit the TP, but you'll lose $115 when it doesn't hit the TP by the 4th position. (My big unknown is how often you hit that loss.) Your biggest worst-case position is 3.38x your base size, but the net position is only 2.03x. That's nothing. (You could increase your risk size &etc by adding more positions before you bail, but the eventual loss starts growing pretty quickly. Add 5 positions before bailing and the loss is $192; add 6 and it's over $300.)

That's the worst this Martingale ever gets. Your max position size and your max loss are strictly determined by how many positions you add before you give up. There is no possible "death trade" in this design. Depending on the percentages it might not be positive in the long run, but it can't blow up.

So again assuming I have my numbers right, the scenario only averages 17 pips per trap. But that is in theory a "sure thing," with very limited and contained risk parameters.

I don't believe in "sure things." I'll have to simulate this before I trust my numbers.

I'm traveling for about 10 days visiting family. I don't know how much time I'll get to work on this for the next week. I'll let you know when I have something.
Author:  spyderman [ Mon Dec 26, 2011 3:19 pm ]
Post subject:  Re: Martingale with "low" margin hit

garyfritz wrote: I'm traveling for about 10 days visiting family. I don't know how much time I'll get to work on this for the next week. I'll let you know when I have something.
Thanks again for your efforts Gary. Have a great and safe trip.
For when you look at this again...did you notice what Alpenkorps and I were discussing about exiting the losses at the point of opening the reverse order. If it works like it appears we could lower our multiplier from 1.5 to 1.3333 and have the same results. That's a huge difference as we get deeper into the cycles.

:D
Author:  garyfritz [ Mon Dec 26, 2011 8:50 pm ]
Post subject:  Re: Martingale with "low" margin hit

OK, I couldn't leave it alone. I'm sitting on my brother's couch banging away on Tradestation. :D

Spidey, that's one of the cases I checked with my spreadsheet. But the problem with the spreadsheet is that I'm just guessing the "how often do you add a position before hitting the TP" factor, which is crucial.

Here are some PRELIMINARY results from my TS strategy. I don't think I have this working perfectly but it's close, and I need to drop it for a while and go spend some time with my family. :lol:

Let me repeat, especially to allay Khalid's concerns: this is a CONTAINED-RISK strategy. It CANNOT blow up. In that respect it's not like a standard Martingale. It runs like a normal Martingale for a set number of position increases, then it bails and takes a predefined-maximum loss. It is NOT a guaranteed winner; depending on the parameters, the loss may happen too often and overwhelm the gains. But it CANNOT have a Death Trade. It CAN take multiple predefined-maximum losses, which might eat up all your profits, but it can't grow out of control and devour your soul.

TS doesn't support hedging, so I wrote it in a US-friendly non-hedging fashion. If the Martingale wants to go long 1.0 and then short 1.5, this strategy goes long 1, then closes and goes short 0.5. The net result is identical.

I'm running on H1 EURUSD, entering a new trap as soon as I exit the old one. H1 should make almost no difference, but the "always enter immediately" probably does. You'd probably do better if you waited for a strong trending move before entering.

So, enough leadup. Does it work?

Maybe. Sometimes.

There are several key inputs to this: the TP/SL size, the Martingale multiplier, the "max positions added before I bail out," and the "where do I bail" inputs are the key ones. I've looked at the "where do I bail" input and anything between "bail halfway between the buy/sell prices" and "bail where you would have added on the next position" seems to work about equally well. "Bail halfway" has a higher expected return, but it lowers the win% so it works out about the same.

The "max positions before I bail" is a very important decision point. This determines how many times you take a Martingale multiplier, so it determines how big your position gets before the "panic and bail" point. The more positions you take, the less often you hit the "bail" point, the more profits you build up between bail losses, and the bigger the loss when you DO bail. According to my spreadsheet, which seems to agree with this TS system's behavior, if you take 3 positions (e.g. long 0.6, short 1.5, long 2.25) and bail, your loss is about 85 pips. If you take 4 positions, your loss is 146. Take 5 and the loss is 237; take 6 and it's 374. The critical question is HOW OFTEN those losses happen.

The more heat you're willing to take, the better it works. I ran a test with Mult of 1.5, TP/SL 70/100, bail at midway, running on 2 years of EURUSD. I set it so all these tests ran 629 traps in that time -- an average of about 1.25 traps per trading day. Here are some results based on how many positions you take before you bail:

Code: Select all

#pos   %trapswin   pips/trap    TotalPips  LargestNetPos
  2        41%       -1.82        -1146       0.9
  3        59%       -1.22        - 767       1.35
  4        72%        1.04          657       2.025
  5        80%        4.56         2866       3.0375
  6        85%        8.21         5161       4.556
  7        88%       13.98         8795       6.83
  8        90%       16.67        10457      10.25
  9        91%       12.85         8082      15.38
(The first case has a max size of 0.9 because I start it at 0.6, then 1.5. The 0.6 starting size balances out the advantage that the "hit the TP in the direction you started" case has, so it doesn't matter which side you break out of. Go long 0.6 and your net size is 0.6; then with the non-hedging logic, go short 1.5 is equivalent to closing the 0.6 long and shorting 0.9. Then when you add a long with a 1.5*1.5 = 2.25 size, you close the 0.9 short and go long 1.35. That "net position" is shown in the table above.)

So with these settings, you can take on a maximum net position size of 3x your starting size (actually 5x bigger than your original 0.6 starting position), and make a whopping 4.56 pips per trap. And you make 5 separate trades to make those 4.56 pips. Take on almost 7x starting leverage, with 7 trades, and you can make 14 pips. Beyond 8 positions it looks like you hit the Big Loss situation often enough that you start to lose ground -- but you wouldn't want to be taking on 15x leverage anyway.

So, PRELIMINARY conclusion: This does work. Kinda. You have to be willing to take on at least 3 or 4x initial position size to get more than a few pips out of the trap -- and most likely the slippage/spread on the reversals would eat up the few pips you earn. There is no free lunch here.

You might be able to set one of these traps when you have a trending entry point, and increase your winning percentage that way. But the Martingale by itself is not enough to magically squeeze pips out of the market.
All times are UTC Page 4 of 12