Posts

Showing posts from July, 2024

ghosttangentcrossing

 // This Pine Scriptâ„¢ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © ChartPrime //@version=5 indicator("Ghost Tangent Crossings [ChartPrime]", overlay = true, max_lines_count = 100, max_polylines_count = 100, max_labels_count = 500, max_bars_back = 1000) type pivot     float current = na     int current_idx = na     float previous = na     int previous_idx = na pivothigh(float source, int back, int forward)=>     var pivot pivot_high = pivot.new(na, na, na, na)     bool ph = not na(ta.pivothigh(source, back, forward))     if ph         pivot_high := pivot.new(source[forward], bar_index - forward, pivot_high.current, pivot_high.current_idx)     [pivot_high, ph] pivotlow(float source, int back, int forward)=>     var pivot pivot_low = pivot.new(na, na, na, na)     bool pl = not na(ta.pivotlow(source, back, f...