It has been a while since I experimented with my own version of the currency slope strength indicator, it's main value is deciding which pairs have the best prospects for a price swing and could complement FBATT (Find best assets to trade).
The Price action EA is running on many charts and this is starting to be a drag on memory and CPU. It would be great if I could wake them up only when they are needed by other criteria such as FBATT or CSS.
I was pleased to find that Mazmazz had created an open source C++ version on github, however, when I came to use it I had a couple of issues with the code. The first one was spotted by the compiler because of strict type checking, but then Empty4 became CPU bound, froze and I had to kill it. So I had to go back to my old code from 2013 and blow off the cob webs.
In the end I had to re-factor the code significantly so that common code between EA, script and indicator would compile without warnings and errors. I also needed to produce some additional output in a CSV like format which can be read by an EA. This can be produced on several time-frames and consists of current value and rate of change, for example:
CSS_H4_all_pairs_max_change_late_July2017.png
There are two aspects to this data
a) the bar just closed for live analysis
b) previous bars for other analysis
So in the top line where it read 20:00 'sell': it means JPY is getting stronger and CAD is getting weaker, however, this is not very useful by itself. The first two values can be read off from inspecting a CSS chart and the last value is the rate of change between bars.
CadJpy is one of those ugly expensive pairs to trade, so we wouldn't want to jump in on a whim. It is the kind of pair that needs a week to allow for the chance of making some pips. Therefore, what we really need to know is the start and end of a weekly move.
In one sense, when we see CADJPY as the strongest moving pair it means price has already moved significantly, so the direction could be right but the timing wrong.
The following chart shows how CadJpy went from bull to bear over several days:
CADJPY-H4-end-of-july-bull-to-bear-01Aug2017.png
From this chart we can see that price swings up and down making it difficult to trade without using a large stop loss.
Going back to the table of strongest CSS differences, CADJPY first arrives on the radar at 20:00 on the 27July, but after price has already moved. We need price to retrace before making an entry. 'A' and 'B' are times where we could enter to sell but where do we get an entry signal from?
Firstly, the EA is not going to suggest short range entries on this pair. Nevertheless, the log file does contain some interesting analysis:
Code: Select all
12:00 CADJPY: : giH4Lwma10Direction: -1
12:00 CADJPY: : H4TrendFilter: bH4Lwma5Lwma10PriceUp: 0; bH4Lwma5Lwma10PriceDown: 1
12:00 CADJPY: : H4TrendFilter: bH4BarOC_AboveRisingLwma10: 0; bH4BarOC_BelowFallingLwma10: 1
12:00 CADJPY: : H4TrendFilter: bH4BarOC_AboveRisingLwma5: 0; bH4BarOC_BelowFallingLwma5: 1
12:00 CADJPY: : H4JustOpenAboveRisingLwma10: 0; H4JustOpenBelowFallingLwma10: 1
12:00 CADJPY: : gbH4Lwma10Lwma60DivergingUp: 0; gbH4Lwma10Lwma60DivergingDown: 1
12:00 CADJPY: : gbH4BarNearToUnderLwma10: 1;
gbH4Lwma10Rising: 0, gbH4Ma20Lwma60Rising: 0,
(gdH4Lwma5 > gdH4Lwma10): 0, (gdH4Lwma10 > gdH4Sma20): 0
gbH4Lwma10Falling: 1, gbH4Ma20Lwma60Falling: 0,
(gdH4Lwma5 < gdH4Lwma10): 1, (gdH4Lwma10 < gdH4Sma20): 1
[/size]
From the above analysis it is clear that the H4 trend is down, in particular note
a) H4JustOpenBelowFallingLwma10: 1
b) gbH4Lwma10Lwma60DivergingDown: 1
c) (gdH4Lwma5 < gdH4Lwma10): 1, (gdH4Lwma10 < gdH4Sma20): 1
We have the basis of a slow moving entry method for longer lasting trades, we don't need CSS to tell us about the price direction, but perhaps it can help confirm the quality of a trend.
So this does not help the short range entries but opens up other possibilities for new entry methods.
In the following H4 close-up we can relate the EA analysis to the chart:
CADJPY_H4_A_closeup_1200_entry_31Jul2017.png
We can see that bars are generally moving down followed by a retrace up to the intersection of two moving averages. Then we see a doji bar close just under the MAs. Our area of interest is 12:00 because this H4 bar opens under a falling moving average. There is often a limited price reverse for these kind of entries, which might give us a 3 or 4 to 1 win/loss ratio. The orange-brown rising slow MA can be expected to provide support to price and could be a good place to take profits.
Perhaps the way to interpret the CADJPY strong reading as confidence that price is not going to go far in the opposite direction?
In the past I have discussed an entry method (which I termed ORFB (Open, Reverse, Forward, Break)). This can be better understood on an M15 chart:
CADJPY_M15_3_sell_entry_points_12noon_31July2017.png
Now we can see 3 potential entry points A(-), A and A(+)
Each entry point has a common characteristic of opening near-under a moving average.
H4 ORFB is the sequence of H4 open at 12 then we have two 'reverse' M15 bars followed by a 'forward' bar which closes below the H4 open ('break') and we have completed an ORFB sequence.
In this particular case we can perhaps shave off a few pips from the stop-loss but since it is a fat spread pair we still need to allow 20 to 30 pips for the trade be successful.
There is no short term signal for this pair from the EA and I have been diverted from my original agenda of helping the EA to make better short range entries into thinking about longer lasting trades. I need to look somewhere else to answer question of what best to trade over a day or two...
You do not have the required permissions to view the files attached to this post.