PINE LIBRARY
PineML_v6

Library "PineML_v6"
ML Library for lightweight strategies. Implements k-NN with matrix storage.
method new_model(k, history, features)
Създава нов модел
Namespace types: series int, simple int, input int, const int
Parameters:
k (int): Брой съседи (напр. 5)
history (int): Дълбочина на паметта (напр. 1000 бара)
features (int): Брой променливи, които ще следим
method train(model, feature_array, label)
Добавя нови данни към паметта на модела
Namespace types: KNN_Model
Parameters:
model (KNN_Model): Инстанцията на модела
feature_array (array<float>): Масив с текущите стойности на индикаторите
label (float): Резултатът (класът), свързан с тези данни
method predict(model, query_features)
Изчислява прогноза на база текущите данни
Namespace types: KNN_Model
Parameters:
model (KNN_Model)
query_features (array<float>)
KNN_Model
Fields:
k_neighbors (series int)
max_history (series int)
features (matrix<float>)
labels (array<float>)
feature_count (series int)
ML Library for lightweight strategies. Implements k-NN with matrix storage.
method new_model(k, history, features)
Създава нов модел
Namespace types: series int, simple int, input int, const int
Parameters:
k (int): Брой съседи (напр. 5)
history (int): Дълбочина на паметта (напр. 1000 бара)
features (int): Брой променливи, които ще следим
method train(model, feature_array, label)
Добавя нови данни към паметта на модела
Namespace types: KNN_Model
Parameters:
model (KNN_Model): Инстанцията на модела
feature_array (array<float>): Масив с текущите стойности на индикаторите
label (float): Резултатът (класът), свързан с тези данни
method predict(model, query_features)
Изчислява прогноза на база текущите данни
Namespace types: KNN_Model
Parameters:
model (KNN_Model)
query_features (array<float>)
KNN_Model
Fields:
k_neighbors (series int)
max_history (series int)
features (matrix<float>)
labels (array<float>)
feature_count (series int)
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.