SMCFunctions

findSwingPoints(high, low, swing_size)
Parameters:
high (float)
low (float)
swing_size (int)
detectBOS(close, high, low, prevHigh, prevLow, highActive, lowActive, bos_conf_type)
Parameters:
close (float)
high (float)
low (float)
prevHigh (float)
prevLow (float)
highActive (bool)
lowActive (bool)
bos_conf_type (string)
getBOSDetails(highBroken, lowBroken, prevHigh, prevLow, prevSwing, prevHighIndex, prevLowIndex, input_show_choch)
Parameters:
highBroken (bool)
lowBroken (bool)
prevHigh (float)
prevLow (float)
prevSwing (int)
prevHighIndex (int)
prevLowIndex (int)
input_show_choch (bool)
calculateRetracementLevels(start_price, end_price)
Parameters:
start_price (float)
end_price (float)
Added:
addSwingPoint(swing_points_array, bar_index, price, type, direction, max_size)
Parameters:
swing_points_array (array<SwingPointData>)
bar_index (int)
price (float)
type (string)
direction (int)
max_size (int)
addBOS(bos_details_array, bar_index, price, bos_text, direction, original_price, creation_bar, max_size)
Parameters:
bos_details_array (array<BOSData>)
bar_index (int)
price (float)
bos_text (string)
direction (int)
original_price (float)
creation_bar (int)
max_size (int)
addRetracementLevel(retracement_levels_array, bar_index, price, type, direction, start_bar_index, max_size)
Parameters:
retracement_levels_array (array<RetracementData>)
bar_index (int)
price (float)
type (string)
direction (int)
start_bar_index (int)
max_size (int)
getBufferedSwingPoints(swing_points_array, lookback_bars)
Parameters:
swing_points_array (array<SwingPointData>)
lookback_bars (int)
getBufferedBOSDetails(bos_details_array, lookback_bars)
Parameters:
bos_details_array (array<BOSData>)
lookback_bars (int)
getBufferedRetracementLevels(retracement_levels_array, lookback_bars)
Parameters:
retracement_levels_array (array<RetracementData>)
lookback_bars (int)
getBufferedSwingPointsSize(swing_points_array)
Parameters:
swing_points_array (array<SwingPointData>)
getBufferedBOSDetailsSize(bos_details_array)
Parameters:
bos_details_array (array<BOSData>)
getBufferedRetracementLevelsSize(retracement_levels_array)
Parameters:
retracement_levels_array (array<RetracementData>)
SwingPointData
Fields:
bar_index (series int)
price (series float)
type (series string)
direction (series int)
BOSData
Fields:
bar_index (series int)
price (series float)
bos_text (series string)
direction (series int)
original_price (series float)
creation_bar (series int)
RetracementData
Fields:
bar_index (series int)
price (series float)
type (series string)
direction (series int)
start_bar_index (series int)
Updated:
findSwingPoints(highSeries, lowSeries, swing_size)
Parameters:
highSeries (float)
lowSeries (float)
swing_size (int)
detectBOS(closeSeries, highSeries, lowSeries, prevHigh, prevLow, highActive, lowActive, bos_conf_type)
Parameters:
closeSeries (float)
highSeries (float)
lowSeries (float)
prevHigh (float)
prevLow (float)
highActive (bool)
lowActive (bool)
bos_conf_type (string)
getBOSDetails(highBroken, lowBroken, prevHigh, prevLow, prevSwingType, prevHighIndex, prevLowIndex, showChoch)
Parameters:
highBroken (bool)
lowBroken (bool)
prevHigh (float)
prevLow (float)
prevSwingType (int)
prevHighIndex (int)
prevLowIndex (int)
showChoch (bool)
addSwingPoint(swing_points_array, b_index, p, t, dir, max_size)
Parameters:
swing_points_array (array<SwingPointData>)
b_index (int)
p (float)
t (string)
dir (int)
max_size (int)
addBOS(bos_details_array, b_index, p, txt, dir, orig_p, cr_bar, max_size)
Parameters:
bos_details_array (array<BOSData>)
b_index (int)
p (float)
txt (string)
dir (int)
orig_p (float)
cr_bar (int)
max_size (int)
addRetracementLevel(retracement_levels_array, b_index, p, t, dir, start_b_index, max_size)
Parameters:
retracement_levels_array (array<RetracementData>)
b_index (int)
p (float)
t (string)
dir (int)
start_b_index (int)
max_size (int)
Added:
classifySwingPoint(pivHi, pivLo, prevHigh, prevLow, prevSwing)
Parameters:
pivHi (float)
pivLo (float)
prevHigh (float)
prevLow (float)
prevSwing (int)
detectRetracementTrigger(prevSwing, prevSwingPrev, current_bar_index, prevHigh, prevLow, pivHi, pivLo, swing_size)
Parameters:
prevSwing (int)
prevSwingPrev (int)
current_bar_index (int)
prevHigh (float)
prevLow (float)
pivHi (float)
pivLo (float)
swing_size (int)
detectFVG(high, low, bar_time)
Parameters:
high (float)
low (float)
bar_time (int)
checkFVGMitigation(fvg, high, low, close, open, mitigation_type)
Parameters:
fvg (FVGData)
high (float)
low (float)
close (float)
open (float)
mitigation_type (string)
detectBPR(fvg_array)
Parameters:
fvg_array (array<FVGData>)
detectVolumeSpike(close, prev_close, volume, ema_volume, threshold)
Parameters:
close (float)
prev_close (float)
volume (float)
ema_volume (float)
threshold (float)
addFVG(fvg_array, high_time, low_time, high_price, low_price, is_bullish, max_size)
Parameters:
fvg_array (array<FVGData>)
high_time (int)
low_time (int)
high_price (float)
low_price (float)
is_bullish (bool)
max_size (int)
addVolumeSpike(spike_array, bar_time, price, percent_oi, normalized_volume, max_size)
Parameters:
spike_array (array<VolumeSpikeData>)
bar_time (int)
price (float)
percent_oi (float)
normalized_volume (float)
max_size (int)
getBufferedFVGs(fvg_array, lookback_bars, bar_time)
Parameters:
fvg_array (array<FVGData>)
lookback_bars (int)
bar_time (int)
getBufferedVolumeSpikes(spike_array, lookback_bars, bar_time)
Parameters:
spike_array (array<VolumeSpikeData>)
lookback_bars (int)
bar_time (int)
getBufferedFVGSize(fvg_array)
Parameters:
fvg_array (array<FVGData>)
getBufferedVolumeSpikeSize(spike_array)
Parameters:
spike_array (array<VolumeSpikeData>)
FVGData
Fields:
high_time (series int)
low_time (series int)
high_price (series float)
low_price (series float)
is_bullish (series bool)
mitigated (series bool)
VolumeSpikeData
Fields:
bar_time (series int)
price (series float)
percent_oi (series float)
normalized_volume (series float)
Updated:
findSwingPoints(high, low, swing_size)
Parameters:
high (float)
low (float)
swing_size (int)
detectBOS(close, high, low, prevHigh, prevLow, highActive, lowActive, bos_conf_type)
Parameters:
close (float)
high (float)
low (float)
prevHigh (float)
prevLow (float)
highActive (bool)
lowActive (bool)
bos_conf_type (string)
getBOSDetails(highBroken, lowBroken, prevHigh, prevLow, prevSwing, prevHighIndex, prevLowIndex, input_show_choch)
Parameters:
highBroken (bool)
lowBroken (bool)
prevHigh (float)
prevLow (float)
prevSwing (int)
prevHighIndex (int)
prevLowIndex (int)
input_show_choch (bool)
addSwingPoint(swing_points_array, bar_index, price, type, direction, max_size)
Parameters:
swing_points_array (array<SwingPointData>)
bar_index (int)
price (float)
type (string)
direction (int)
max_size (int)
addBOS(bos_details_array, bar_index, price, bos_text, direction, original_price, creation_bar, max_size)
Parameters:
bos_details_array (array<BOSData>)
bar_index (int)
price (float)
bos_text (string)
direction (int)
original_price (float)
creation_bar (int)
max_size (int)
addRetracementLevel(retracement_levels_array, bar_index, price, type, direction, start_bar_index, max_size)
Parameters:
retracement_levels_array (array<RetracementData>)
bar_index (int)
price (float)
type (string)
direction (int)
start_bar_index (int)
max_size (int)
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.
Declinazione di responsabilità
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.