Pennant Chart Pattern Exploration for Amibroker (AFL)
This scan/exploration extends the triangle search by Graham Kavanagh
The original scans for triangles using Highest High AND Lowest Low over a 20 bar period, then next High over a chosen period after these HHV AND LLV. He requires the order of the highs AND lows are to be in alternate order and his test will pick up ascending, descending AND equal triangles. His ‘variable’ d1 (set to 20)is the number of days to lookback and search for the last Highest High, AND d2 is the gap after this HH to start searching for the next HH after the first. Similarly for the Lowest lows the variables z? represent the highs, AND w? the lows.
This extended program adds a number of options, as follows:
- It automatically searches over different lookback periods between d1max and d1min, set to 60 and 20 (but easily changed) and records all succeses. Because of the nature of triangles,a single value for d1 can miss many valid cases.
- Where the triangle criteria are satisfied on successive days, only the last of these is retained in order to reduce the amount of output.
- The user can toggle between searches based on the data H and L, or the highs and lows of the candle body.
- The lengthy test to yield a “buy” in the original has been broken down into 7 separate conditions, allowing the user to easily change the conditions. Thus, Condition 3 tests for the triangle shape. This can use a more liberal test via the parameter toggle that has been added. Similarly, Cond5 is a volume test which can now be left in or excluded.
Finally, the user should note that conds 6 and 7 test that the general price trend is up. If interested in potential downward moves, a user might want to delete these from the “buying” test.
Submitted by kaiji over 7 years ago
- Double Dojis Exploration
- Butterfly Pattern
- Candle stick scanner
- Cup and Handle Exploration
- Harmonic pattern detection
- Price Projection by Gann ( Murray Math lines)
Please login here to leave a comment.