Hey everyone,
I know it's been awhile since I released a new EA on this forum. I've been refining the problem I had when it comes to pattern-finding, and I have a preliminary solution.
What this EA does is it takes the moving average value of the x most recent bars on the chart. The EA then scans backward on the chart looking for that same number of bars with a similar moving average shape--measured using a simple correlation formula.
When the correlation ratio is above a certain threshold, the EA gets y number of bars following the matching set of bars and projects that into the future of the chart, creating something like the picture below.
http://content.screencast.com/users/...10-20_2227.png
Whenever there is a projection on the chart, the EA will calculate the rick reward ratio for a long trade and a short trade with the expectation that the price will reach the extreme of the projection. There are settings that are used to add a buffer based on a percentage of that projection.
I am releasing this EA into the wild in an attempt to improve it. The pattern recognition method is crude at best, but far more accurate than my previous attempt. This EA has been released as a favor to you, and in return, I would appreciate efforts to identify proven ways to improve this EA.
Here are the appropriate descriptions of the settings unique to this EA:
I know it's been awhile since I released a new EA on this forum. I've been refining the problem I had when it comes to pattern-finding, and I have a preliminary solution.
What this EA does is it takes the moving average value of the x most recent bars on the chart. The EA then scans backward on the chart looking for that same number of bars with a similar moving average shape--measured using a simple correlation formula.
When the correlation ratio is above a certain threshold, the EA gets y number of bars following the matching set of bars and projects that into the future of the chart, creating something like the picture below.
http://content.screencast.com/users/...10-20_2227.png
Whenever there is a projection on the chart, the EA will calculate the rick reward ratio for a long trade and a short trade with the expectation that the price will reach the extreme of the projection. There are settings that are used to add a buffer based on a percentage of that projection.
I am releasing this EA into the wild in an attempt to improve it. The pattern recognition method is crude at best, but far more accurate than my previous attempt. This EA has been released as a favor to you, and in return, I would appreciate efforts to identify proven ways to improve this EA.
Here are the appropriate descriptions of the settings unique to this EA:
- extern int WindowLength = 20;
- This is the number of bars that the EA will try to find a match for in the history.
- extern int PredictionLength = 10;
- This is the number of bars after a matched set that the EA will project into the future
- extern int SearchLength = 100000;
- This is the number of bars to search.
- extern int MAPeriod = 1;
- This is the number of bars against which to calculate the moving average
- extern int MAPrice = PRICE_CLOSE;
- This is the price used to generate the moving average. Each number is associated with a price as found here http://docs.mql4.com/constants/prices
- extern int TopResults = 10;
- This is the maximum number of results to overlay for projecting into the future.
- extern double MinCorr = 0.90;
- This is the minimum correlation to consider a result for projecting into the future.
- extern double TPBuffer = 0.20;
- The is the percentage of the future range that the take profit will be reduced by.
- extern double SLBuffer = 0.10;
- This is the percentage of the future range that the stop loss will be increased by.
- extern double MinRR = 2;
- This is the minimum Reward / Risk ratio that the EA will place trades against.
WARNING: This EA is HIGHLY Experimental
Use at Your Own Risk
Attached File(s)
PatternFinding Correlation.mq4
25 KB
|
4,125 downloads