HedgeHog System & EA - page 2

 
sampson:
You're doing some great work, it's very interesting. Martingaling isn't something I'm a huge fan of, but it does seem like it's worthwhile in this type of system, and the pitfalls of using it differ from that of other types of systems.

Thank you. I would like to get some competant (sp?) programmers on this to edit up the MQ4 code so we can do some backtesting. Not too sure how to program in the martingale component, but if that were possible, i think we have something really good.

Thanx,

Graham

 
gkozlyk:
Thank you. I would like to get some competant (sp?) programmers on this to edit up the MQ4 code so we can do some backtesting. Not too sure how to program in the martingale component, but if that were possible, i think we have something really good.

Thanx,

Graham

I'll have a go at it, just want to double check the rules:

If a trade is open for more then 2 days, it's closed, correct? Is this considered a loss when it comes to the martingale component? Or is it only a loss if it hits the stoploss?

Anything else I should know?

 
sampson:
I'll have a go at it, just want to double check the rules:

If a trade is open for more then 2 days, it's closed, correct? Is this considered a loss when it comes to the martingale component? Or is it only a loss if it hits the stoploss?

Anything else I should know?

Under the original rules, the trades were closed at the end of the day. The multiplier for martingale rules would be something like this:

New Lot size = +(net loss / 10 ) +1, so if first round lot size is 1 and it got closed at -34, then it would be 3.4 + 1 or 4.4 for the second round trade on the side of the loss.

So far the only trade i have seen last a whole day or longer is the EurGbp as it isn't that fast of a mover. I have no problem letting this one run, and to keep adding in trades for this one. Yesterday i had 3 EurGbp trades left over from last week cash out in profit today, so they seem to work out too, just not as fast as the other pairs.

Hope that helps,

Graham

 

Nice work Graham.

Looks very promising on first look.

Having 4 currency pairs at the same time will be a winner. In effect you get 8 trades runnning (2 each pair) and even if one of the pairs doesn't make a T/P you still make a profit (7 winners = 70 pips, 1 loser = 50 pips).

Say you pick the best 4 pairs. The statistics say that there is a 15% chance of a loser. So roughly you would get 1 losing trade every other day. So the above 20 pip profit day would be followed by an 80 pip profit day. Plus of course you can double the lots on the currency pair that lost.

Hell, even if you get 1 loss a day and double up that losing pair the next day you would end up with a tidy profit.

Can't wait for Sampson to code a working EA.

Mike4X.

 
mike4X:
Nice work Graham.

Looks very promising on first look.

Having 4 currency pairs at the same time will be a winner. In effect you get 8 trades runnning (2 each pair) and even if one of the pairs doesn't make a T/P you still make a profit (7 winners = 70 pips, 1 loser = 50 pips).

Say you pick the best 4 pairs. The statistics say that there is a 15% chance of a loser. So roughly you would get 1 losing trade every other day. So the above 20 pip profit day would be followed by an 80 pip profit day. Plus of course you can double the lots on the currency pair that lost.

Hell, even if you get 1 loss a day and double up that losing pair the next day you would end up with a tidy profit.

Can't wait for Sampson to code a working EA.

Mike4X.

I posted on the original thread something i thought up on about Money Management, as it was brought up on there about "How do we possibly trade something like this?"

At any rate, here is the post i did on there"

Well, if we played the scenario of money management with Hedgehog, lets start with some numbers:

Money Management

With $10000, 5% would put us at $500, so mini lots are $50 so 10 mini lots would be 5% with $10000... Now with hedging, i would only calculate the worst side, seeing at 1 side always cashes out in profit. My logic would be to calculate it on the second level as well too where the first lost. Last week of trading on the major 7 pairs, out of 5 days and 2 timeframes (so over 130 total trades), i so far have had only 1 that was wrong twice in a row). By also keeping it to 5% that also gives us wiggle room for running a 3rd level once in a while when a trade is wrong twice in a row. My results seem that it is rare for the major pairs.

So based on that, and an average 6x size for round 2, and give maybe 4 wrong together at the same time, that would lead a total of 7lots first round, and 27 second round. 27 / 10 would be .37 base size for first round trades, and 2.59 for second round.

Using those numbers and my results last week my $5100 00:00GMt results would have net'd $190 Real dollars using .37 mini lots (these are the mini lots normally worth $1 / pip).

Now keep in mind, it isn't the first round that is using the 5%, cuz it is only using around 1.3%. It is the Martingale trades on second level. Also all my calculations are based on using the .37 lots for a 10TP. With MoneyQuests 5TP running 2 lots, you would have to double your lots to have the same profit, or my lot number for 1/2 the profit (because the TP is half). So my $190 example would actually be $95 using the 5TP using the same Money Management equation.

An idea to increase yield is to run higher lots on the trades with a better % success rate (proven over time and testing), like the EurJpy in my test. With it 18/18 last week, i would think it a better trade pair than say the eur/gbp which still has 5 open trades.

-------

Ok, so there ya go, that way the question on money management is out in the open as well.

Enjoy,

Graham

 

Thought i would post an update for Monday's Trades:

22:00 had 2 first level losses, however still earned $892.84 for overall P/L of $7866. Losses were a buy on the GbpUsd and a buy on the GbpJpy. Today i will do a level 2 trade on both of those on the buy side. Overall system accuracy so far is 70/82 or 85.37% for this time frame.

00:00 as well had 2 first level losses, however still earned $271.90 for overall P/L of $7619. The losses were on a buy on the eurjpy and gbpjpy, so thus will have level 2 trades on buys today. Overall accuracy is 77 / 91 = 84.62%

Enjoy,

Graham

 

I probably won't have time to make up the EA until tomorrow, so if anyone wants to take a shot at it in the mean time feel free.

 
sampson:
I probably won't have time to make up the EA until tomorrow, so if anyone wants to take a shot at it in the mean time feel free.

Hey no problem. I don't think we really expected any immediate results. I wll post here the different versions that have been done and what the improvements are, so that way you don't have to re-invent the wheel.

Graham

 

OK, here are the EA's from the original thread and settings/what they do. Now i was not part of the original process, however I would like to see an EA created that executes trades just like i have been doing manually with great success. For more info, answer to specific EA questions, and all credit due, goes to the original thread on post #1 of this thread. Support for these EAs are for resource purposes only, but are not supported or maintained here, only used as a reference. Below i post the EA name, post # and the blurb on that post. Enclosed is a .zip of all the EAs.

On to the EAs:

------------------- HedgeTest.mq4 --- post #2

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=2

Attached is an indicator which you can use to visually see how it would look on a chart.

If the RED or BLUE line is broken through by a tick it means the BUY/SELL LIMIT was reached. I use a 1 hour chart to view it on.

Variables:

Offset=14; - Number of pips above/below days open price

TimeZoneOfData=0; - by default if time zone of data is at GMT 0 (timezone of your trading account

------------------- HedgeHog 1.0.mq4 --- post #40

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=40

DO NOT USE THIS EA IN LIVE OR DEMO TRADING - IT IS NOT WORKING YET!!!

I have attached a "rough draft" of an EA and the MAJOR problem I'm having at the moment is getting it to initiate a trade at 00:00 GMT

1) It is picking and choosing what days it wants to trade and not doing it every day at 00:00 GMT

2) Is not entering both a BUY and a SELL

Any of you programers out there - help would be appreciated!!!!

Here is the routine that works when it wants to (testing dates 1/2/06 through 1/31/06 with 15min data)

if (TimeHour(Time[0])==0+BrokerOffsetToGMT && TimeMinute(Time[0])==0)

{

EnterSell();

EnterBuy();

}

------------------- HedgeHog.mq4 --- post #82

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=82

There is the EA. But backtesting doesn't seem to be profitable.

------------------- HedgeHog v1.1.mq4 --- post #88

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=88

There is original EA with implemented stoploss.

***Now this is the one that i found has the best performance, as it is purely the hedge trader with stoploss ***

------------------- HedgeHogUltra v1.1.mq4 --- post #95

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=95

There is EA for your ULTRA strategy. I used stop orders instead market. There are 2 opportunities to close opposite order when one is triggered. You can choose PO_mode:

0 - close when opposite is actived

1 - close at 23:55

There is no adjustment for different broker settings of time, so if you use it on the platform with another time than GMT, you have to change time settings.

***Based on Strategy found on post #87. This trader uses the Ultra Strategy, which doesn't do initial hedge, but rather bracket style trading (entry buy stop and sell stop). Good idea, but maybe as an option for the future. ***

------------------- HedgeHog_v1.3.mq4 --- post #104

http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=104

Initiates market orders (not pending) at the time specified under the EA's properties.

CHANGES:

It only initiates 1 trade at the specified time. It uses a 5M Parabolic SAR to determine the direction which to place the trade (BUY/SELL). This at least gives us a fighting chance of being right.

Trailing Stop: This not only helps on trades going our way, but can reduce the STOP LOSS we end up being stuck with.

Settings:

StartHr=0; // Start hour to initiate trade

StartMin=30; // Start minute to initiate trade

StopLoss=75;

TakeProfit=20;

Lots=1;

DaysOfClose=2; // how many days before closing open orders

TS_Mode=1; // use trailing stop 0=NO 1=YES 2=TS Only

TS_Trigger=5;

TS_Sensitivity=5;

*** This one executes 1 trade based on PSar, so not a hedge system anymore. That is why i stuck with v1.1 ***

-----------------------

I hope that helps our cause. And lastly, as i was trolling the other thread for info, i found MoneyQuest's results on the Eur/Usd for Feb and March. Here are the stats, the trading log is enclosed under "Hedge Hog Trading Results.zip".

Original post is here: http://www.strategybuilderfx.com/forums/showpost.php?p=149755&postcount=234

Here is a summary of his results:

No of wins:22

No of losses:5

% win:81.5

Total profit:700 pips

Total losses:192 pips

Profit factor:3.65

Max No of consecutive win:8

Max No of consecutive losses:1

Maximum drawdown:90 pips

Maximum lots traded:6

His results do confirm the same results i have been getting as well. So i hope you guys enjoy the data

 

Well, here are Tuesdays result thus far:

22:00 GMT

Of the 7 major pairs we are testing, the GbpJpy, UsdChf and UsdJpy Stopped Out and the EurJpy is still out, hovering around -24. Netresults still for the day is $870 for a cumulative result of $8736.

00:00 GMT

All the trades worked out, except the UsdChf, for a net result for the day of $2080 and a cumulative total of $9700.

So today i shall be running Martingale on the above pairs for 6 lots.

Today was alot less movement, yet the system still worked. Here are the updated accuracy rates:

22:00 85.11%

00:00 86.67%

note:any order still open doesn't get counted, like the 22:00 EurJpy trade still out and the bunch of eurgbp that take days to mature.

Enjoy,

Graham

Reason: