Engulfing Outside bar

Post Reply
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Engulfing Outside bar

Post by gaheitman »

joancb wrote:P.S. You could have told something to the author of the strategy, I think it has been rude for your part to start working on something like this without not even telling to the author :oops:

Cheeers!
Apparently I skimmed your original message too quickly. Did you think ending your post by calling us rude was going to motivate us to roll up our sleeves and help you out?

As for whether or not the act of building an EA for free for someone can be considered rude or not, I'll leave that to the individual to decide. I believe the first post accurately credits the OP at FF with the idea and also makes it clear that he/she as well as the entire community at FF is welcome to have a copy of it once we've worked through most of the bugs.

George
kenfen
Trader
Posts: 26
Joined: Wed Nov 30, 2011 4:53 am

Re: Engulfing Outside bar

Post by kenfen »

gaheitman wrote:I believe the first post accurately credits the OP at FF with the idea and also makes it clear that he/she as well as the entire community at FF is welcome to have a copy of it once we've worked through most of the bugs.

George
Actually...I would just like to point out that beyond the Warning...its the first SENTENCE that gives the credit!

What a bizarre post to have to reply to, George! :evil:

As a matter of interest, can anybody definitively point to a source that can legitimately claim trading Engulfing Outside Bars as "their" invented strategy? Been around for many, many moons, me thinks.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Engulfing Outside bar

Post by SteveHopwood »

joancb wrote:P.S. You could have told something to the author of the strategy, I think it has been rude for your part to start working on something like this without not even telling to the author :oops:

Cheeers!
Leaving aside the replies already posted, further down George's post 1 he writes this:
"Sharing with FF
Feel free to upload the EA to FF, once we've achieved a level of stability. "

Ok, so not quite the same as directly contacting him, but not a lot of point in telling the FF thread originator about the EA until we know for sure it works as intended.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
garyfritz

Re: Engulfing Outside bar

Post by garyfritz »

Back to the EA... Since I'm still incompetent in MQL and since I trust Tradestation's backtesting a lot more than Empty4's, I knocked out a quick system in TS to backtest this idea on 5 years of data.

My first attempt looked promising. I tested it on daily data, i.e. looking for reversals on a daily level. (I run it on intraday bars to make sure I know whether the market peeks out of the high or the low first.) Not all pairs made money, but many of them did.

Then I added a few things and "improved" the logic. And then most pairs lost money. :( As far as I can tell, my current implementation is working correctly. But I thought it was mostly correct before. Some pairs still work OK on a daily TF but you have to pick and choose carefully.

I kept working on it and extended it work on different timeframes -- M30, H1, M90, H2, etc. That worked MUCH MUCH better, except the average trades are very small. Most pairs only average 2-4 pips per trade, before spread or commission. I get the best results on most pairs with H3 and H5 bars, but it varies. It's not real stable.

I experimented with TP and SL values. TPs don't seem to help much at all -- it does about as well if you just close at the end of the next bar. SLs helped a little, but not significantly.

I also tried entering "early." E.g. say the previous bar's high/low are H and L. Normally you would look for a break of H, then sell at L. If I want to go 10% early, I'd look for a break of L+0.90*(H-L), then sell at L+0.10*(H-L). That helped a little, maybe 5% or so, but nothing dramatic.

The win% on this system is surprisingly low, 45-55% or so. I expected that a reversal would generally follow through, but there are MANY cases where it touches the high, reverses and touches the low, and reverses again to take it to a loss. I can't think of a good way to increase the edge. I've played around with the triggers and entries and none of them work all that great. The market just stumbles around every which way and it's hard to capture it with something simple.

George, I think you're implementing this as a multi-symbol EA, and that can't be backtested, right? Did you get it working in single-symbol mode long enough to try backtesting it? I'd like to confirm that we get the same results.
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Engulfing Outside bar

Post by Alpenkorps »

I still believe this strategy holds great potential. I am backtesting different settings. I am yet to reach a conclusion or find the best settings .. just sharing the recent discovery.

Image

TF 15, SL 20, TP 10, MinBarSize 10, no BE
Test result of 2011 (Jan-Nov)

Smilee89 at FF suggested using H4 with very high SL, his backtest shows a very good win ratio. I am working to find a good setting on smaller TF because thats how I feel more comfortable.

My initial effort on H1 failed .. If anyone can get good results on H1, please share with us.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Engulfing Outside bar

Post by gaheitman »

garyfritz wrote: George, I think you're implementing this as a multi-symbol EA, and that can't be backtested, right? Did you get it working in single-symbol mode long enough to try backtesting it? I'd like to confirm that we get the same results.
The version posted is single currency, single time frame. I decided I needed a little more confidence we have something worth pursuing before investing the time to make it multi-currency/multi-time frame. :)

Alpenkorps requested a version with a simple martingale lot size multiplier. He's verified it works as expected, but I have not published yet. The multiplying is optional, of course.

George
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Engulfing Outside bar

Post by gaheitman »

Alpenkorps wrote:I still believe this strategy holds great potential. I am backtesting different settings. I am yet to reach a conclusion or find the best settings .. just sharing the recent discovery.

Image

TF 15, SL 20, TP 10, MinBarSize 10, no BE
Test result of 2011 (Jan-Nov)

Smilee89 at FF suggested using H4 with very high SL, his backtest shows a very good win ratio. I am working to find a good setting on smaller TF because thats how I feel more comfortable.

My initial effort on H1 failed .. If anyone can get good results on H1, please share with us.
That is a pretty curve. :D Is that with the higher time frame set to 15 or was the chart just 15 and the HTF is something else??
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Update

Post by gaheitman »

Added a simple martingale position sizing multiplier at the request of Alpenkorps. Settings from the EA:

Code: Select all

extern bool    UseRevengeTrade=false;
extern int     RevengeMultiplier=2;
extern int     MaxRevengeMultiplier=16;
Alpenkorps noticed that there are rarely long runs of losing trades, so asked that we up the lot size after each losing trade until we have a winner. I also added the MaxRevengeMultiplier to put a cap on the size of the multiplier. So in the example above, the multiplier will follow the sequence 2, 4, 8, 16 and stop at 16. It resets after a winning trade.

The indicator display has also been updated to indicate the size of the next trade under the lots setting.

EA is in the first post.

George
kenfen
Trader
Posts: 26
Joined: Wed Nov 30, 2011 4:53 am

Re: Engulfing Outside bar

Post by kenfen »

Although I haven't traded for a few weeks...when I do...engulfing bars play a big part in the bread I earn (although I rarely eat bread) for my family..(although I only have nephews). Enough bollocks...

A couple posts ago, I asked, could someone pin-point an origin of Engulfing Outside Bars? Its SOOOooooo simple....logical to trade and code...that it was actually THE first EA I ever coded...on my own. I named it...Engulf! Anyway...

There's another fella knocking around here with a "Sup Dem 2" inclusion...Ribelo...I think his name is? If these two are combined...extremely powerful (cautious)!
garyfritz

Re: Engulfing Outside bar

Post by garyfritz »

In my testing, I'm seeing runs of as many as 13 losing trades. I wouldn't use a Martingale with my money.

But I'm only seeing around 50-60% wins. If you're rarely seeing runs of losses, maybe I've implemented something wrong. What win% do you get?

I am doing this:
* Assuming I'm running on M15, I look at the H and L of an M15 bar.
* I only trade if the H-L is greater than a specified minimum.
* If the market breaks the previous M15 bar's High, I place an order to sell at the previous M15 bar's Low.
* If the market hits the short entry, I place an order to buy (stop and reverse) at the previous M15 bar's High.
* I exit any trade at the end of the M15 bar, and do it all again.
* I also add TP and SL if desired.

Is that what you're testing? Are you testing on a 15-minute period using M15 bars? If so, can Empty4's System Tester tell if you hit the high or the low first? I test M15 using M1 bars to make sure I know which happened first.

Here's an example trading 60-minute "bars:"

Image
Alpenkorps wrote:TF 15, SL 20, TP 10, MinBarSize 10, no BE
I also get a pretty equity curve with TF 15, but the average trade is less than a pip. I don't think your actual account equity curve would look like that.
I am working to find a good setting on smaller TF because thats how I feel more comfortable.
My initial effort on H1 failed .. If anyone can get good results on H1, please share with us.
H1 with 20pip min bar works OK for me. The equity curve looks OK but only if you don't include any costs. Average trade for EURUSD is about 1.25 pip.

H4 is a loser for me. If Smilee89 is getting good results with that, I must have something wrong.
Post Reply

Return to “Automated trading systems”