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 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
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