DC3 Range Bar Strategy

DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

DC3 Range Bar Strategy

Post by DigitalCrypto »

Background
A while back Steve and I collaborated on a project together about building a pure price action EA. It was great and terrible at the same time. Steve did an excellent job on the code. It would make thousands of pips one week but then the following week it would give them all back and then some. While I know in my head the strategy works because I trade this way, I just couldn't find the right words to describe the method accurately to Steve at the time and so I think we both kind of moved on to other things that were hot on the coals.

What is the DC3 Strategy?
The DC3 strategy looks to capitalize on current market conditions. This strategy is a way to quickly identify trade direction and momentum. As such it does not need any indicators to be traded but perhaps it does need indicators for an EA to trade it. Manually trading this method you can expect a 72% or higher win rate just taking 1 bar profit. Normally we use time based candle closes for this but Steve and I found that it's extremely difficult to tell an EA how to trade it. But I found a solution....enter range bars.

The code that Steve wrote a while ago, which is included below, is still applicable to what I am trying to achieve albeit with some minor changes. For one the current timeframe now will always be PERIOD_CURRENT as this will be trading on an offline chart. Secondly the ReadIndicatorValues() function will need to be made to trade the offline bar closes. This is something like

Code: Select all

Oldbars = 0;  if (Oldbars != Bars) { Oldbars = Bars; etc etc etc}
A 34EMA filter needs to be added. If we close under the 34EMA then trade short. A close above is to trade long. EMA direction is not important. So no slope or anything like that.

A brief video (20 min) on momentum
[youtube]https://www.youtube.com/watch?v=lSqdaI3H7tc[/youtube]


Why Range Bars?!
With Range Bars we can have a set risk per position with definite targets. As I was experimenting I found that the M15 candlestick chart with an ATR(480) and a 128 Period Moving Average provided a pretty good guide for the range bar sizes. I then took this information and setup my range bar generator by placing it on a 1m chart and then I would open the corresponding offline chart.

As I looked at all of the wonderful signals being produced I thought this was my aha moment and I knew you guys could probably figure this out fast and start using it. I then set to work and looked for a bias to help make the trade signals a little cleaner to see. I added a 34EMA to the chart and a 2 bar semaphore (3Level)

Here's an example chart with markings of white lines for short entries
terminal_2017-05-08_22-29-45.png

3Level Semaphore Indicator
The semaphore indicator is a visual zigzag tool. It can be used for many ways to trade. It can be used for exits as well as entries. I have taken Steve's version of 3Level and made it even more basic. We only need to find the highest candle in 2 bars. For this I am including 3Level2 below. In the EA code there are 3 timeframes for semaphore. They aren't needed. You only need the 3Level2 settings and a 34EMA to be able to spot the entries.

SHORT ENTRIES

If there is a red circle we find the previous lower high and lower low before that bar. With range bars this becomes easy as it will always be the bar before the bar with a red circle. We draw a line under that previous candles low. Now if we get a bar that opens higher than that line and closes down AND it closes UNDER the 34EMA then we can get in the trade. We know that the trade will be good for usually 1 range bar but possibly more.

LONG ENTRIES
If there is a green circle on the sema we find the previous bar with a higher low and higher high to the left. Again with range bars it should be the candle just to the left of the bar with a green circle. We mark the high of that bar with a line. When price opens below that line and closes above AND it's above 34EMA we are good to get long for at least 1 bar.

STOPS
Stops are the green and red circles. Period. Steve already wrote this part of the code and added a buffer to it.

WEIRD THINGS
Ok when I first tried coding this up myself it works but it doesn't work. I know there are some weird things with price happening on charts but sometimes the signals would show on the chart but it wouldn't take the trades. That's why I am bringing the code out to get the right people on it.

Secondly...
I don't know if it's me or Empty4. But the Range Bar EA generator below does leave gaps in the offline charts even when you tell it not to do this. I don't know if this can be fixed or not but I suspect that if there is a gap across the buy or sell line this is why it will miss trades. Similarly if a candle opens and closes above the line and the next candle opens with a gap down and closes below the line a trade won't be fired. Im sure it's just another newb mistake I am making.

Anyway, this is the whole thing in a very tight nutshell. I will be more than happy to expound on anything here.

Let me know if you have questions.

Best regards,
David
DC3V1O.mq4
3Level2.mq4
Range bars EA new format 1 mod.mq4
You do not have the required permissions to view the files attached to this post.
Last edited by DigitalCrypto on Wed May 10, 2017 8:57 pm, edited 22 times in total.
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

DC3 Range Bar Strategy

Post by DigitalCrypto »

Additional Notes on DC3 Strategy
Food for thought...

Because this method has a high win rate, 72-75%, when we are teaching people how to trade this method we also teach them how to trade lot progressions to recover failed trades.

Some people call this a martingale but it isn't. We already know the trade direction. We already know the win rate. But sometimes price will stop us out. This can't really be helped. What we've learned to do in this situation is add in the lost trade to our next trade. This means that if we are trading a 5 pip range bar and we get stopped for 10 pips we don't try to make 15 pips on the next trade. We simply increase the lot position to Lot X 3 for 5 pips. This allows us to take the next trade with a very high probability that we will gain our most of our losses back from the prior failed trade and stack on one more win. If the second trade fails we just resume normal lots as if nothing happened. I would never trust an EA to stack a 3rd time and we never allow it as a general rule.
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

DC3 Range Bar Strategy

Post by DigitalCrypto »

Rene was kind enough to help me out with fixing the opens and closes on the Range Bar Generator from Mladen. I have deleted the old version and updated it with the modified code.

Huge thanks Rene!
User avatar
hopfi2k
Trader
Posts: 35
Joined: Tue Nov 15, 2011 11:03 pm
Location: Germany

DC3 Range Bar Strategy

Post by hopfi2k »

Thanks very much for this *highly* interesting toy!

Demo up and running!

Cheers,
Andy
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

DC3 Range Bar Strategy

Post by tomele »

DigitalCrypto » 08 May 2017, 23:25 wrote:If the second trade fails we just resume normal lots as if nothing happened
As if nothing happened? You just lost a quadruple of your defined risk. Now you need 4 winning trades to break even, assuming a 1:1 risk/reward ratio. You only have a 25% chance now. Now let come two losers in a row... Even worse when speaking of equity percentages. If you go on with this, you will lose all your money very quickly.

A losing trade does never improve the win probability for the next trade in the same direction. Good money management is the opposite: If you were wrong with your first assumption, back up and size your position down. Add to your position only when you are on the right side of the game. Everything else one might call stubborn.

But that is only true for a stock options trader like me. Forex of course is completely different.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
goldcourse
Trader
Posts: 48
Joined: Tue Dec 27, 2011 2:18 am

DC3 Range Bar Strategy

Post by goldcourse »

DigitalCrypto,

Thank you for revealing this strategy .

May I ask in your manual tests, which currency pairs you use and did well?

Thanking you again.
User avatar
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

DC3 Range Bar Strategy

Post by Wavegarrick »

Hi David,

Today I manually scalped this method as you described above with range bars and the 34 Ema, but with one addition, stochs 533 as confirmation. Pairs GbpUsd and Eurusd and I am thoroughly impressed, the entries are good :good:

Thanks to Rene as well.

Cheers
Leon
You do not have the required permissions to view the files attached to this post.
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

DC3 Range Bar Strategy

Post by DigitalCrypto »

Thanks guys,

@Tomele, My apologies, I am not always clear on my writing. To me price is either going up or going down. Sometimes I get on wrong side of trades. I just reverse it and look to make my money back and if some more then that is fine. This isn't meant to be a martingale or anything like that. Again my apologies if it seemed that way. Also when I am trading it I am not trying to take a single 1:1 trade. Trades are anywhere from 3:1 to 16:1 manually. But we never know that until price has showed us what it wants to do. If the trade is a loser I don't reverse right then but I wait for the next valid entry on the pair before getting back into it. And yes you can add to winners.

I need to get to work with you, Rene or Steve on an EA but I know we are all busy at the moment. The strategy is good if you want some manual trades until we can get around to this. Money first, toys second :D
Last edited by DigitalCrypto on Thu May 18, 2017 8:20 am, edited 1 time in total.
DigitalCrypto
Trader
Posts: 237
Joined: Tue Feb 24, 2015 4:38 am

DC3 Range Bar Strategy

Post by DigitalCrypto »

goldcourse » Wed May 17, 2017 2:50 am wrote:DigitalCrypto,

Thank you for revealing this strategy .

May I ask in your manual tests, which currency pairs you use and did well?

Thanking you again.
I like to trade the USD majors because I get excellent spreads on them and low commissions and low margin requirements.

I am happy to manually make 20 or so pips per day. It doesn't take long to do with this method.
goldcourse
Trader
Posts: 48
Joined: Tue Dec 27, 2011 2:18 am

DC3 Range Bar Strategy

Post by goldcourse »

DigitalCrypto » Thu May 18, 2017 4:10 pm wrote:
I like to trade the USD majors because I get excellent spreads on them and low commissions and low margin requirements.

I am happy to manually make 20 or so pips per day. It doesn't take long to do with this method.
DigitalCrypto,

Thank you for your reply. Great strategy ! !
Post Reply

Return to “Automated trading systems”