Back

Identifying Triangle Patterns

Has anyone done any work to identify FX triangle patterns? If so are you willing to share. If not, does anyone want to collaborate on this?

 

More information on this can be found at https://www.dailyfx.com/forex/education/trading_tips/chart_of_the_day/2013/09/05/3_Easy_Triangle_Patterns_Every_Forex_Trader_Should_Know.html

Update Backtest






The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.



No, but just thinking out loud about how it could generally be implemented, I'm guessing you would look at a RollingWindow of price bars of some size, calculate the slope/regression line of the Lows, as well as the slope/regression line of the Highs, and compare them, looking for a ratio that signals the desired pattern.. A new price bar that is some variance outside of one of the regression lines would signal a break-out of the pattern.

0

I can help, if there are some mathematical (rigorous) definitions of each pattern.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


I saw this recently using MathNet.Numerics:

 var line = Fit.Line(x, y);

If you have three rolling windows of data, time, highs, lows and then fit them you could project an intersection where high equation minus low equation = 0. This would be the intersection, point of the triangle. If the two never intersect it would indicate widening highs and lows.

IMHO triangle patterns have the same prediction performance as other price only indicators; but are just harder to implement. The human brain is the master pattern recognition engine; but they also add in a touch of rosy glow which ignores the failure cases.

3

If your quant team will look into Nate Betz and Damien Peck's suggestion, please remember that Lean/QuantConnect does have an indicator for evaluation of a series slope (LeastSquaresMovingAverage):

private LeastSquaresMovingAverage _hiLsma;
private LeastSquaresMovingAverage _loLsma;

// In Initialize
_hiLsma = LSMA("SPY", 200, Resolution.Daily, Field.High);
_loLsma = LSMA("SPY", 200, Resolution.Daily, Field.Low);

// In OnData
var hiSlope = _hiLsma.Slope;
var loSlope = _loLsma.Slope;

 

3

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed