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:Spydey, quick response: you picked a slightly different starting point and thus a different buy/sell band than I did, which is why you saw such different results. (Which again illustrates how unstable this thing is.) My band was the yellow lines here:
MartSpydey.gif
I'll look later at your numbers. At first glance they seem reasonable but I'll have to dig into them when I have more time.
Gary,

Yeah I was thinking that might happen...getting the exact same channel when comparing numbers. You never know where exactly you're going to enter. I adjusted the channel on my shot. I couldn't get it all the way down to where you showed it or we would have hit TP at the red arrow. :)

It did add a couple of cycles to a total of 11 if you rode it all the way. We would have hit BE at the gold arrow after 3 cycles if we had the early exit set there.

But the important thing is that this is the kind of examination I want to see. We all know we can't predict what the markets will do in the future. We can get some idea of what might happen statistically by looking at the past.

As more traders look at this thread and hopefully scan charts we can see how often this type of negative trade might happen. It's not a deal breaker, but not what we want. I mean this is like entering at the worst possible moment. Just a hair later or earlier and it would have been much better for us. But again, that's what we need to look at so thanks for the input.

You've mentioned several times how "unstable" this seems to be. I guess I'm not quite sure what you mean by that in contrast to the market in general and other trading systems. Maybe you could expand on that next time. ;)

Thanks again,
You do not have the required permissions to view the files attached to this post.
Snaggin' some pips
garyfritz

Re: Martingale with "low" margin hit

Post by garyfritz »

spyderman wrote:You've mentioned several times how "unstable" this seems to be. I guess I'm not quite sure what you mean by that in contrast to the market in general and other trading systems. Maybe you could expand on that next time. ;)
By "unstable" I mean "small changes in input parameters, or market conditions, or just about anything else, can cause huge changes in trading results."

A stable system should continue to produce fairly reliable results with minor changes to its inputs. Sweeping the inputs across a range should produce slow and predictable changes. Ideally it would also perform pretty consistently under different market conditions, but that's harder. But the key idea is that you can be reasonably confident how it will act under typical trading conditions. This is critical because you can't know exactly what the trading conditions will be like in the future, when you actually trade it with real money. You need to be able to assume that the system will probably keep working the way it has in the past.

This system doesn't do that. Very small changes to its inputs, or when you start trading it, etc, can produce drastic changes to its results. (At least that's the way my implementation works, with its "bail out after N positions" exit. I don't know how your other exit will affect it yet.)

If small changes can cause huge changes in performance, you can't have any confidence that it will continue to act in the future the way it has in the past. The future results are a crapshoot. It's not something you can confidently trade in realtime.
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:
spyderman wrote:You've mentioned several times how "unstable" this seems to be. I guess I'm not quite sure what you mean by that in contrast to the market in general and other trading systems. Maybe you could expand on that next time. ;)
By "unstable" I mean "small changes in input parameters, or market conditions, or just about anything else, can cause huge changes in trading results."

A stable system should continue to produce fairly reliable results with minor changes to its inputs. Sweeping the inputs across a range should produce slow and predictable changes. Ideally it would also perform pretty consistently under different market conditions, but that's harder. But the key idea is that you can be reasonably confident how it will act under typical trading conditions. This is critical because you can't know exactly what the trading conditions will be like in the future, when you actually trade it with real money. You need to be able to assume that the system will probably keep working the way it has in the past.

This system doesn't do that. Very small changes to its inputs, or when you start trading it, etc, can produce drastic changes to its results. (At least that's the way my implementation works, with its "bail out after N positions" exit. I don't know how your other exit will affect it yet.)

If small changes can cause huge changes in performance, you can't have any confidence that it will continue to act in the future the way it has in the past. The future results are a crapshoot. It's not something you can confidently trade in realtime.
Hmmm...not sure I entirely agree with that. Just about any system or EA will have input variables that if changed will alter the results drastically. That's why we try to optimize the settings and calibrate to market conditions on a regular basis. I wouldn't necessarily think that finding one particular trading scenario that wasn't ideal would make a system "unstable".

Obviously changing when I exit the strategy is going to change the results drastically, just as changing the exit on any strategy would change the results drastically, whether it was a bailout or a T/P level. Correct? :)
Snaggin' some pips
garyfritz

Re: Martingale with "low" margin hit

Post by garyfritz »

Changing the logic will make big changes. But making minor changes to parameters shouldn't.

Here's an incredibly crude drawing of an optimization test. I'm sweeping some parameter through a range of values (X axis) and plotting the $ profit resulting from each parameter. In this test, almost any value in this range is profitable. That means almost any value is likely to be profitable in the future. If you choose a parameter value in the middle of the range, you can be pretty confident that it will perform well in forward trading. I would consider this a "stable" system parameter.
Stable.gif
Here's a drawing of another system test. When I sweep the parameter in this system, the results are all over the map. Wildly profitable results are right next to losing results. You could pick one of the high-profit values for live trading, but the chances of it acting like that in the future are nil. You have no idea how this system will perform in the future. I would consider this an "unstable" system and I wouldn't touch it with a 10 meter pole.
Unstable.gif
Guess what this Martingale system looks like?
You do not have the required permissions to view the files attached to this post.
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 would consider this an "unstable" system and I wouldn't touch it with a 10 meter pole.


Guess what this Martingale system looks like?
Well Gary, you may be right. For me a lot of numbers on a spreadsheet don't mean as much as seeing trades on a chart. Moving forward, hopefully I'll either see a tradeable system or enough examples of actual price action where I would of had to exit at a large enough loss to outweigh the wins.

To trade this I'll definitely have to be selective about pairs, stay away from those trading flat and focus on the higher atr pairs.

If no coders want to try coding an EA at this point I might just hire it out. I'm no coder, but compared to other strategies I've seen here and elsewhere, I think this should be fairly easy to code. ;)

Meanwhile, I'll continue manually. Very cumbersome and easy to miss the trade pivots if they happen at night, which for me is the London session. :x
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 »

spyderman wrote:
garyfritz wrote: I would consider this an "unstable" system and I wouldn't touch it with a 10 meter pole.


Guess what this Martingale system looks like?
Well Gary, you may be right. For me a lot of numbers on a spreadsheet don't mean as much as seeing trades on a chart. Moving forward, hopefully I'll either see a tradeable system or enough examples of actual price action where I would of had to exit at a large enough loss to outweigh the wins.

To trade this I'll definitely have to be selective about pairs, stay away from those trading flat and focus on the higher atr pairs.

If no coders want to try coding an EA at this point I might just hire it out. I'm no coder, but compared to other strategies I've seen here and elsewhere, I think this should be fairly easy to code. ;)

Meanwhile, I'll continue manually. Very cumbersome and easy to miss the trade pivots if they happen at night, which for me is the London session. :x
Just be a bit patient, gonna post the EA today, hopefully, so, no need to hire someone... :lol:
You gonna have 2 versions, one that has SL at the opposite order open price level, the other one with no SL. Will explain logic as soon as I'll post them.
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:
spyderman wrote:
garyfritz wrote: I would consider this an "unstable" system and I wouldn't touch it with a 10 meter pole.


Guess what this Martingale system looks like?
Well Gary, you may be right. For me a lot of numbers on a spreadsheet don't mean as much as seeing trades on a chart. Moving forward, hopefully I'll either see a tradeable system or enough examples of actual price action where I would of had to exit at a large enough loss to outweigh the wins.

To trade this I'll definitely have to be selective about pairs, stay away from those trading flat and focus on the higher atr pairs.

If no coders want to try coding an EA at this point I might just hire it out. I'm no coder, but compared to other strategies I've seen here and elsewhere, I think this should be fairly easy to code. ;)

Meanwhile, I'll continue manually. Very cumbersome and easy to miss the trade pivots if they happen at night, which for me is the London session. :x
Just be a bit patient, gonna post the EA today, hopefully, so, no need to hire someone... :lol:
You gonna have 2 versions, one that has SL at the opposite order open price level, the other one with no SL. Will explain logic as soon as I'll post them.

Sweet. Thanks DD :)
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 »

So, this one:

No SL for orders, it will track only Positions profit(cummulative);

Profit Level is a multiplier of LevelsOffset. If you use Engulfing or IB/OB triggers, LevelsOffset is HALF of the trigger candle range. So, if you choose 10 (that's pips), means that you want a trigger candle of minimum 20 pips and maximum 80 pips. Also, TP will be 6* LevelsOffset, meaning TP will be 60 pips.
OverallProfit Closure will look to close all positions if profit is greater than NetProfit value, in $. Using Trailing, means EA will try to win more than NetProfit, if possible, but will eventually close all orders if profit drops below max profit - 5%(MaxRetrace).
TradesNo is the max number of trades open before EA will drop NetProfit at 0. Value of 3 means at 3 open trades, NetProfit becomes 0, EA will look for BE.
GridStartTime if you use a specific open price to start trading.

Ok, those explanations are good for both versions.

Now, for this one, you will have initially a straddle of baselot pending orders.If one gets triggered, the other one is replaced with the next lotsize, based on Mart multiplier.But on the 3rd sequence you will have baselot + baselot*1.5^2(if you using 1.5 as multiplier). Due to round up, if base is 0.01, it will be 0.01+0.03, and so on (0.02+0.05, 0.01+0.03+0.08, etc.) Not exactly as you wish...but here it comes the other version!
You do not have the required permissions to view the files attached to this post.
Image
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 »

Now, for this one:

Each opposite order open price is SL for initial order.
Until lots >= MaximumLots(0.03), it looks to close at TP or at Profit. Expected profit is NetProfit +(MaxPL - P/L), but if lots = 0.03, it becomes any value neccesary to recover previous P/L (that means BE). I have made MaximumLots as external to allow you to input the exact round up calculations needed.
Rest is the same.

Let me know if something is not working as it should.I have tested both bots on Cowboy IBFX-AU, H1 TF.

P.S. One more thing: due to the fact I haven't used Global Variables, if you have any open positions and restart Empty4, all stored values will reset, so...will be loads of error msg. :D Yeah, i'm not perfect! ;)
Last edited by DragosDanescu on Tue Jan 03, 2012 5:39 pm, edited 1 time 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 »

DragosDanescu wrote:Now, for this one:

Each opposite order open price is SL for initial order.
Until lots >= MaximumLots(0.03), it looks to close at TP or at Profit. Expected profit is NetProfit +(MaxPL - P/L), but if lots = 0.03, it becomes any value neccesary to recover previous P/L (that means BE). I have made MaximumLots as external to allow you to input the exact round up calculations needed.
Rest is the same.

Let me know if something is not working as it should.I have tested both bots on Cowboy IBFX-AU, H1 TF.

P.S. One more thing: due to the fact I haven't used Global Variables, if you have any open positions and restart Empty4, all stored values will reset, so...will be loads of error msg. :D Yeah, i'm not perfect! ;)

Many thanks DD,

Let me play with this and see if I can follow the inputs, etc. :?
Snaggin' some pips
Post Reply

Return to “Ideas for Possible Automation”