PINE LIBRARY
Updated MLPivotsBreakouts

Library "MLPivotsBreakouts"
Utilizes k-NN machine learning to predict breakout zones from pivot points, aiding traders in identifying potential bullish and bearish market movements. Ideal for trend-following and breakout strategies.
breakouts(source, pivotBars, numNeighbors, maxData, predictionSmoothing)
Parameters:
source (float): series float: Price data for analysis.
pivotBars (int): int: Number of bars for pivot point detection.
numNeighbors (int): int: Neighbors count for k-NN prediction.
maxData (int): int: Maximum pivot data points for analysis.
predictionSmoothing (int): int: Smoothing period for predictions.
return [series float, series float, series int]: Lower and higher prediction bands plus pivot signal, 1 for ph and -1 for pl.
Utilizes k-NN machine learning to predict breakout zones from pivot points, aiding traders in identifying potential bullish and bearish market movements. Ideal for trend-following and breakout strategies.
breakouts(source, pivotBars, numNeighbors, maxData, predictionSmoothing)
Parameters:
source (float): series float: Price data for analysis.
pivotBars (int): int: Number of bars for pivot point detection.
numNeighbors (int): int: Neighbors count for k-NN prediction.
maxData (int): int: Maximum pivot data points for analysis.
predictionSmoothing (int): int: Smoothing period for predictions.
return [series float, series float, series int]: Lower and higher prediction bands plus pivot signal, 1 for ph and -1 for pl.
Release Notes
v2Updated: Compiler annotations
Release Notes
v3Updated:
breakouts(pivotBars, numNeighbors, maxData, predictionSmoothing)
Detects and predicts breakout points from pivot data.
Parameters:
pivotBars (int): int: Number of bars for pivot point detection.
numNeighbors (int): int: Neighbors count for k-NN prediction.
maxData (int): int: Maximum pivot data points for analysis.
predictionSmoothing (int): int: Smoothing period for predictions.
Returns: [series float, series float, series int]: Lower and higher prediction bands plus pivot signal, 1 for ph and -1 for pl.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.