Contribute an indicator to the library by clicking here. Note you must be logged in.

New! Stock Portfolio Organizer is now available:
  • Shares, Margin, Futures and Forex
  • EOD and Realtime data
  • And Much More...
GoTo Stock Portfolio Organizer
New! WiseTrader Toolbox for Amibroker is now available with:
  • Advanced Adaptive Indicators
  • Advanced Pattern Exploration
  • Neural Networks
  • And Much More...
GoTo WiseTrader Toolbox

Popular Indicators

Pennant Chart Pattern Exploration for Amibroker (AFL)

3 / 5 (Votes 11)

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.

Similar Formulas



Thanks a lot one of the most useful afl on the site.

2. hotaro3

Nothing Happend After Pasting the Formula. Could you please say me Why?

thanks u

Thank you

Please login here to leave a comment.

Main Menu