Martingale with "low" margin hit

Place your new trading idea here to see if someone can automate it.
Post Reply
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

garyfritz wrote:I don't believe in forward-testing as a way to see if a system really "works." It takes forever and you might never hit the doomsday scenario until after you go live.

At this point I can't do this in Empty4. But I can do it in Tradestation. When I get some copious free time (hah!! in addition to the 6-7 hours of skull-sweat I've put into this already!) I'll code it up in TS and backtest it on several YEARS of data on a bunch of pairs. That will give us way more confidence than forward-testing it for a couple of weeks or months. And when we're talking Martingale, I want to be very VERY confident.

Coding the basic 70/100/1.5 example isn't hard. How to decide when to open a trade? I think I'll just do the braindead-simple thing and say "as soon as I close out a trap, open another one centered around the current price." You could do much better than that e.g. if you only opened traps in a strongly trending market, so you hit the 70-pip winners a lot more often, but let's do the worst-case-stupid test first.

Later. :D
That would be fantastic. Let me know what I can do to help.
I agree with your idea on opening. Ultimately that is going to determine success or failure, just some fine tweaking for later.

If I can suggest I'd go with 75/100/1.5. That's what I had figured initially. Probably won't make a hill of a beans of difference but it makes for nice round numbers if you start your trade on a multiple of 25....hmmmmm...wonder if that could come into play psychologically. Oh well food for another day.
Does Tradestation allow you to run optimization of different parameters like Empty4. That could come in handy moving forward.

Thanks again, :D
Snaggin' some pips
garyfritz

Re: Martingale with "low" margin hit

Post by garyfritz »

Oh yeah, TS has a very nice backtest capability. Unfortunately it doesn't handle multi-symbol portfolio testing, but we wouldn't need that for this system anyway.
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

garyfritz wrote:
If you have 50% chance of breaking out after any particular addition, then 50% of the time you make 70 (the "0" line in the chart), 25% of the time you make 5 (the "1" line), 12.5% of the time you make 77.50 (the "success" case of the "2" line), and 12.5% of the time you lose -212.5. So over the long haul you average just under 20 pips on EVERY TRADE, and you NEVER take on a position bigger than 2.25x, for a net position heat of about 1.35x your original size.

If you step it up a level and never put on more than 4 positions, you're in the "3" line of the table. 50% of the time you make 70, 25% you make 5, 12.5% you make 77.5, 6.25% you make 16.25, 6.25% of the time you lose 75 * (1 + 2.25) - 100 * (1.5 - 3.38) = only -244.25!? Average is about 16.5 pips, biggest position size is 3.38x, net heat of only about 2x??
Gary,

As I look closer at your chart I was noticing a difference in your figures from mine. I had envisioned starting with .01 lots which when multiplied by the 1.5 came to .015. I then had to round that up to a tradeable size of .02 lots on most platforms. So right out of the gate instead of a profit of 5 pips if your first reversal hit, I would be getting 40 pips. (I was using 75/100 so it actually was 50). I would have to make the same adjustment on the 4th cycle where .03 * 1.5 would have to be rounded to .05 and so forth.

What that effectively did was increase my potential profit at the beginning (that's good) but causes my potential risk to escalate faster (that's not so good ;) )

Then that got me to thinking. What if after a given amount of cycles we would have the EA start using a lower multiplier just to break us even. Say after 5 cycles, we just want out, so instead of using 1.5 we use 1.33333 which should just break us even at TP from that point forward. (1.3333 if we're using 75/100) After 10 cycles that would put us at only .32 lots even with rounding up as opposed to .62. After 15 cycles we're at 1.39 lots as opposed to 4.73. That's a pretty big difference.

We're getting warmer. ;)
Snaggin' some pips
garyfritz

Re: Martingale with "low" margin hit

Post by garyfritz »

Yeah, I thought about having the multiplier change over time, probably decreasing. But really, if the "bail after 3-4 reversals" idea works out as well as I think it does, then I don't think I want to keep in a steadily-increasing position size. I'd rather bail and get on with the next trap.

Dunno. Have to test it and see what happens.
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

garyfritz wrote:Yeah, I thought about having the multiplier change over time, probably decreasing. But really, if the "bail after 3-4 reversals" idea works out as well as I think it does, then I don't think I want to keep in a steadily-increasing position size. I'd rather bail and get on with the next trap.

Dunno. Have to test it and see what happens.

Agreed ;)
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

Hi guys,
I try to follow you both, but, at some point, I've lost you. Can you be a bit more specific, maybe with a clear example of what you wanna do? You lost me at 70/100/1.5...what that means? Or it's the wine?!? Hahahaha....

Merry Xmas, btw!
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

DragosDanescu wrote:Hi guys,
I try to follow you both, but, at some point, I've lost you. Can you be a bit more specific, maybe with a clear example of what you wanna do? You lost me at 70/100/1.5...what that means? Or it's the wine?!? Hahahaha....

Merry Xmas, btw!
Hey Dragos,

Thanks for joining in. We definitely want as many as possible to give their feedback.

I think a lot of the confusion is that 70/100/1.5 looks like a math formula, and that's not the case in this scenario...at least not directly. It would probably be better to write 70,100,1.5 ;)

The 70/100 part (I like using 75/100 for easier math) is a ratio of the pip distance of d2 to d1 on the chart. If you divide 75 by 100 you get a ratio of 1.33333. So using that figure we know that if every time we are reverse and hit a buy or a sell we have to multiply our previous lot size by that number. But that's just to break even. So we juice that up to 1.5 and use that as our multiplier. So that's the numbers 75/100/1.5 or ... d2/d1/lot multiplier. We can change the d1,d2 and d3 to whatever we want but we need to keep the ratio such that d1 divided by d2 stays low enough so that our multiplier can stay low.

As a side point we can't go too low. Of course it has to be over 1.000, otherwise your sell level would be above your buy level. d3 needs to be a legitimate distance so that it won't get hit every few pips, I like 25. Then I like 75 as my d2. That gives me a nice 75,100 with a multiplier of 1.5. Time will tell if that ends up being a good ratio. In that scenario you could lower your multiplier to 1.4 (still above 1.3333) but you wouldn't be getting much profit.

Hope I didn't mud things up even more. It's early :lol:

Anyone, feel free to chime in with questions or comments.
You do not have the required permissions to view the files attached to this post.
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

Ok, thanks, I got it now. As a coincidence, I'm just testing a similar ideea, lol...using for that the EuroGrid EA that I wrote already for that thread. It has a slightly different opening strategy and it uses now a certain hour for trigger, but can be tested with different TP levels, single or multiple side positions, and martingale for opposite side and for the diff levels on the same side(if more than 1).

I have also attached different closing strategies, as net profit in $, as time based close, etc.
It can be also adapted to close by a certain formula, based on SendLots(if SendLots > x*Lot.....)

What I can get is where you guys have determined those percents, when we win and when we lose, or it's just a guess?

Check this, for example:
If you use my set file, it will open 2 levels each side, with mart for each level AND for opposite side too, gap between sell/buy and levels = 10 pips, (levels offset) and TP is at 4*levels offset. Also it will try to close at any positive profit if SendLots > 0.05. Use it only on H1 TF.
You do not have the required permissions to view the files attached to this post.
Last edited by DragosDanescu on Sun Dec 25, 2011 3:34 pm, edited 2 times in total.
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

Yeah Gary has crunched a lot of numbers that I don't necessarily follow, but he's trying to work those out with some back testing on tradestation. I think at this point they're more of an educated guess. I mean if we buy on the first leg it's true there's a 50% chance that price will go up, but that doesn't mean it will go up all the way to TP.

But I think more important to the central idea is just that, in the real world, can you expect to hit your TP before the lot size gets unmanageable. I, personally, have never seen a martingale that would guarantee a profit while at the same time keeping your lot size down for as long as this would. (that doesn't mean it's not out there. ;) )

The key will be is the 75 pips or whatever on a ongoing/multiple basis worth the risk of 5, 6, 7, etc. cycles that you may hit once in a while.

Just a side point here...
When talking about Martingales, we talk about the "Death Trade". Most would say that it will happen. I'm not so sure. While that may be true mathematically I don't think that that's necessarily true in the real world. At what point does a 1 in a xxxx chance become a non-factor.

Now, again, I'm not saying the death trade wouldn't happen with this system. We haven't explored it enough yet. We need to do the backtesting.

I don't have the skills to write the EA. So Gary is working in Tradestation and I would love to get someone to write it in Empty4 as well and get this thread in the EA section. :D
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

Hahaha, EA is already here!

Also, if you check log, it will specify closing condition used.
I got even 20 trades opened with sendlots no bigger than 0.12, so....just play with multipliers :D

It can also close at given profit value, in $, as I said before, just activate the option OverallProfitClosure (it will override close at TP level option).

On the display, you got result today, next lot, buy lots and sell lots and many more useful info. You can disable Display info, as it displays unnecessary info(from the initial strategy).
Last edited by DragosDanescu on Sun Dec 25, 2011 3:24 pm, edited 2 times in total.
Image
Post Reply

Return to “Ideas for Possible Automation”