TradingView
twingall
9 mar 2023 23:04

Filter-Out Weak Pivot highs/lows, Swing highs/lows: Method 

E-mini Nasdaq-100 FuturesCME

Descrizione

Just a simple indicator for refining the standard method of finding Pivot highs & Lows; Allowing user to filter-out weak/flat/rounded Pivot highs/lows

-Aim of this is to get pivot highs & pivot lows coded to print more in line with what the eye would naturally be drawn to as an obvious pivot high/low.
-This uses local moving average around the pivot high/low together with user-input ATR multiple, to create a condition for filtering out lacklustre pivot highs/lows.
-Thought i'd publish this separately as a tool that other coders might find useful.

//inputs//
~adjust looback/lookforward for Pivot highs/lows
~adjust 'spikiness' index to filter out less impressive pivot highs/lows (higher number = more selective)

Note di rilascio

-added Alert conditions:
~Set manually from indicator status line (three dots)
~Will alert on sweep of most recent (freshly painted) Piv H/L
~Based on indicator settings at the time of setting the alert

Note di rilascio

-added alerts conditions for pivot high/low confirmed (as well as swept)
-toggle on/off 'spikeyness' condition to see how it affects pivot high/low painting (default is ON)

Note di rilascio

-Added 'wait one bar to confirm' condition to avoid re-painting (default is ON). Toggle this off to go back to original version where realtime confirmation happens 1 bar sooner, but at the cost of sometimes causing repainting.
Commenti
UnknownUnicorn15320316
is repaint?
biswad
@Bafrali1453, yes
twingall
@biswad @Bafrali1453
ah, i see. This type of re-painting is an unavoidable aspect of using pivots. see here for more info (scroll down to 'Plotting in the past'): tradingview.com/pine-script-docs/en/v5/concepts/Repainting.html
twingall
@biswad @Bafrali1453, apologies, i dug a little deeper and found an easy fix for repainting issue; there's an option now to wait one bar before confirmation. Updated script now. Default is toggled ON.
Moda-877
Can you add alerts condition for swing low/high
twingall
@Mode_m-889, this is just a method; have incorporated it into these indicators which now have alerts:
-Typical Sweeps: Pivot high/low boxes. Grade sweeps, Handles/Pips
-Consecutive Unswept Lower Highs/ Higher Lows Counter
twingall
@Mode_m-889, also, what do you mean exactly: alert when swing low/high is confirmed or when previous swing low/high is hit? If the latter, just use 'Typical Sweeps: Pivot high/low boxes. Grade sweeps, Handles/Pips' with box height set to zero
akintades333
How come this is so accurate on the weekly chart with the default settings?
Mr.Pearson92
Hi. Why do I get an alert 8 hours after the piv high or low has triggered on the chart? Is there a way to get it to alert me as soon as it happens? Thanks
twingall
@MR.Pearson92, alert for piv high/low confirmed would come in after the number of bars 'pivot lookback/lookforward' have elapsed since the pivot high/low. Test it on 1min timeframe with low lb/lf input settings to see.. DM me if issue is different than this..
Altro