Skip to main content

Posts

Showing posts from January, 2025

qml level (https://docs.google.com/document/d/1Gg2jPfEprAu104PK8buvXYtWFyG1JPfw/edit)

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © EmreKb //@version=5 indicator("Quasimodo Pattern", "QML", overlay=true, max_bars_back=5000, max_labels_count=500, max_lines_count=500) zigzag_len = input.int(13, "ZigZag Length") var float[] high_points_arr = array.new_float(5) var int[] high_index_arr = array.new_int(5) var float[] low_points_arr = array.new_float(5) var int[] low_index_arr = array.new_int(5) to_up = high >= ta.highest(zigzag_len) to_down = low 0 ? last_trend_up_since : 1, 1)) low_index = bar_index - ta.barssince(low_val == low) last_trend_down_since = ta.barssince(to_down[1]) high_val = ta.highest(nz(last_trend_down_since > 0 ? last_trend_down_since : 1, 1)) high_index = bar_index - ta.barssince(high_val == high) if ta.change(trend) != 0 if trend == 1 array.push(low_points_arr, low_val) array.push(low_index_arr, low_index) if trend == -1 ...