Online Logistic Forecaster [forexobroker]

Online Logistic Forecaster trains a single-feature logistic regression in real time via stochastic gradient descent. The feature is the standardised price-EMA distance; the target is "next bar closes higher". Each bar updates weight w := w - eta * (sigmoid(w * x) - y) * x. Forecast probability of next-bar up = sigmoid(w * x). Adaptive learning without batch training.
🔶 ALGORITHM
1. EMA = ema(close, len); ATR = atr(14).
2. Feature x = (close - EMA) / ATR (ATR-normalised distance).
3. Online SGD step: y_prev = (close[1] > close[2]); w := w - eta * (sigmoid(w * x[1]) - y_prev) * x[1].
4. Forecast: p_up = sigmoid(w * x).
5. Bull bias when p_up >= upper threshold; bear bias when <= lower threshold.
🔶 SIGNAL LOGIC
- Buy: bull bias edge (cross above upper threshold) AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: bear bias edge.
- Position-lock state machine.
🔶 INPUTS
- Feature EMA Length (default 20)
- Learning Rate eta (default 0.05)
- Buy Probability (default 0.60)
- Sell Probability (default 0.40)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, sigmoid line, buy / sell colors
🔶 ALERTS
OLF Buy, OLF Sell, OLF Any Signal, OLF Bull Edge, OLF Bear Edge, OLF High Conf Up, OLF High Conf Dn, OLF Strong Weight, OLF Webhook JSON.
🔶 LIMITATIONS
- One feature gives a 1D logistic forecast; multi-feature models would be more powerful but require explicit weight management.
- SGD with high eta can oscillate; defaults (eta = 0.05) balance convergence vs adaptation.
- The model needs warm-up of dozens of bars before w stabilises; early bars produce noisy forecasts.
- The "sigmoid line" visual is anchored at the EMA and scaled by ATR — purely informational.
🔶 ALGORITHM
1. EMA = ema(close, len); ATR = atr(14).
2. Feature x = (close - EMA) / ATR (ATR-normalised distance).
3. Online SGD step: y_prev = (close[1] > close[2]); w := w - eta * (sigmoid(w * x[1]) - y_prev) * x[1].
4. Forecast: p_up = sigmoid(w * x).
5. Bull bias when p_up >= upper threshold; bear bias when <= lower threshold.
🔶 SIGNAL LOGIC
- Buy: bull bias edge (cross above upper threshold) AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: bear bias edge.
- Position-lock state machine.
🔶 INPUTS
- Feature EMA Length (default 20)
- Learning Rate eta (default 0.05)
- Buy Probability (default 0.60)
- Sell Probability (default 0.40)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, sigmoid line, buy / sell colors
🔶 ALERTS
OLF Buy, OLF Sell, OLF Any Signal, OLF Bull Edge, OLF Bear Edge, OLF High Conf Up, OLF High Conf Dn, OLF Strong Weight, OLF Webhook JSON.
🔶 LIMITATIONS
- One feature gives a 1D logistic forecast; multi-feature models would be more powerful but require explicit weight management.
- SGD with high eta can oscillate; defaults (eta = 0.05) balance convergence vs adaptation.
- The model needs warm-up of dozens of bars before w stabilises; early bars produce noisy forecasts.
- The "sigmoid line" visual is anchored at the EMA and scaled by ATR — purely informational.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.