Ai predictor
- 지표
- Andrey Kozak
- 버전: 1.0
- 활성화: 20
AI Predictor is an artificial intelligence-based indicator trained to forecast future price movements several bars ahead. You can specify the number of forecasted bars in the indicator settings. The longer the indicator remains on the chart and gathers analytical data, the more accurate its price predictions become. The indicator draws future candles predicting with high probability the direction in which the price is likely to move.
The AI Predictor indicator is designed to forecast price movements for N future bars using a voting system based on technical indicators (EMA, ADX, RSI, Stochastic, H4 EMA) and a self-learning mechanism. It displays forecasted candles (blue for bullish trend, red for bearish) on the price chart and automatically adjusts its parameters if prediction accuracy drops below a predefined threshold. Below is a detailed and precise description of each indicator parameter in English, including its purpose, impact on performance, and configuration recommendations.
Indicator Parameters and Configuration:
BarsToAnalyze
-
Type: Integer
-
Default: 50
-
Description: Defines how many historical bars are analyzed for calculating technical indicators (EMA, ADX, RSI, Stochastic, ATR, H4 EMA). These form the voting system's data basis.
-
Impact:
-
Higher values provide more data for analysis, potentially improving accuracy but increasing calculation time.
-
Lower values speed up calculations but may reduce signal reliability due to insufficient data.
-
-
Recommendation:
-
Keep 50 for GBP/USD M5 with sufficient data.
-
Reduce to 30 or 25 on strategy tester or new accounts.
-
For H1 or slower timeframes, increase up to 100.
-
Check the Experts tab for “Insufficient bars” messages.
-
FastMAPeriod
-
Type: Integer
-
Default: 12
-
Description: Initial period for fast EMA used to detect short-term trend in the voting system.
-
Recommendation:
-
12 for M5 GBP/USD.
-
For scalping: 8–10.
-
For conservative setups: 14–16.
-
Self-adjusts dynamically (CurrentFastMA) between 8–20.
-
SlowMAPeriod
-
Type: Integer
-
Default: 26
-
Description: Initial period for slow EMA to define long-term trend.
-
Recommendation:
-
26 for M5 GBP/USD.
-
Aggressive: 20–22.
-
Stable markets: 30–40.
-
Self-adjusts (CurrentSlowMA) between 20–40.
-
ADXPeriod
-
Type: Integer
-
Default: 14
-
Description: ADX period measuring trend strength.
-
Recommendation:
-
14 standard for M5.
-
Faster response: 10–12.
-
Stable trends: 16–20.
-
ADXThreshold
-
Type: Double
-
Default: 25
-
Description: ADX strength threshold for voting weight.
-
Recommendation:
-
25 for GBP/USD M5.
-
Volatile pairs: 20–22.
-
Calm markets: 28–30.
-
Adjusted dynamically (CurrentADXThreshold) 15–35.
-
RSIPeriod
-
Type: Integer
-
Default: 14
-
Description: RSI period for overbought/oversold detection.
-
Recommendation:
-
14 standard.
-
Scalping: 9–12.
-
Longer-term: 18–21.
-
RSIOverbought
-
Type: Double
-
Default: 70
-
Description: RSI level above which a bearish vote is cast.
-
Recommendation:
-
Default: 70
-
Aggressive: 65–68
-
Conservative: 75–80
-
Dynamically adjusted 60–80.
-
RSIOversold
-
Type: Double
-
Default: 30
-
Description: RSI level below which a bullish vote is cast.
-
Recommendation:
-
Default: 30
-
Aggressive: 32–35
-
Conservative: 20–25
-
Adjusted within 20–40.
-
StochKPeriod, StochDPeriod, StochSlowing
-
Types: Integer
-
Defaults: 14, 3, 3 respectively
-
Descriptions: %K, %D, and slowing for Stochastic oscillator.
-
Recommendations:
-
K: 14 (default), 9–12 (fast), 18–21 (slow).
-
D: 3 default, 2 (sensitive), 5–7 (smooth).
-
Slowing: 3 default, 2 (scalp), 4–5 (volatile).
-
StochOverbought
-
Type: Double
-
Default: 80
-
Description: Overbought level triggering bearish signal.
-
Recommendation:
-
Default: 80
-
Aggressive: 75–78
-
Conservative: 85–90
-
Adjusted 70–90.
-
StochOversold
-
Type: Double
-
Default: 20
-
Description: Oversold level triggering bullish signal.
-
Recommendation:
-
Default: 20
-
Aggressive: 22–25
-
Conservative: 10–15
-
Adjusted 10–30.
-
ATRPeriod
-
Type: Integer
-
Default: 14
-
Description: ATR period for calculating candle height.
-
Recommendation:
-
Default: 14
-
Volatile: 10–12
-
Calm: 16–20
-
ForecastBars
-
Type: Integer
-
Default: 10
-
Description: Number of forecasted bars.
-
Recommendation:
-
Default: 10 (~50 mins on M5)
-
Scalping: 5–7
-
Swing: 12–15
-
Ensure rates_total > minBars .
-
MinAccuracy
-
Type: Double
-
Default: 0.6 (60%)
-
Description: Minimum prediction accuracy before re-optimization.
-
Recommendation:
-
Default: 0.6
-
Testing: 0.5
-
Strict: 0.65–0.7
-
LearningRate
-
Type: Double
-
Default: 0.1
-
Description: Controls speed of parameter adaptation.
-
Recommendation:
-
Default: 0.1
-
Faster learning: 0.2–0.3
-
Stable markets: 0.05
-
VoteThreshold
-
Type: Double
-
Default: 0.3
-
Description: Minimum combined vote weight to define trend.
-
Recommendation:
-
Default: 0.3
-
Low confidence? Lower to 0.2
-
Conservative? Raise to 0.4–0.5
-
DebugMode
-
Type: Boolean
-
Default: true
-
Description: Enables log messages for debugging.
-
Recommendation:
-
True during testing.
-
False in live trading to reduce log load.
-
Configuration Guidelines
General Steps:
-
Start with Defaults – optimized for GBP/USD M5.
-
Use Strategy Tester – evaluate parameter changes.
-
Enable DebugMode – monitor accuracy and errors.
-
Load Historical Data – especially M5 and H4 bars.
Tuning Steps:
-
Step 1: Ensure candles are visible
-
Enable chart shift.
-
If no candles:
-
“Insufficient bars”: lower BarsToAnalyze .
-
“Low-confidence vote”: reduce VoteThreshold .
-
“Invalid data”: ensure H4 data or lower long-periods.
-
-
-
Step 2: Optimize Accuracy
-
Watch “Accuracy: X” in logs.
-
If often <60%:
-
Raise LearningRate to 0.2.
-
Reduce FastMAPeriod , RSIPeriod , or ADXThreshold .
-
Increase SlowMAPeriod and ADXThreshold in calm markets.
-
-
-
Step 3: Forecast Candle Size
-
Modify ATRMultiplier (default 0.7).
-
Increase to 1.0–1.2 (bigger candles) or decrease to 0.5 (smaller).
-
Use longer ATRPeriod if candles too large.
-
-
Step 4: Voting Balance
-
Inspect “Weights=[...]” in log.
-
If one indicator dominates with low accuracy:
-
Reduce its initial weight.
-
Raise VoteThreshold for reliability.
-
-
-
Step 5: Backtest & Fine-tune
-
Test on 1–3 months GBP/USD M5 data.
-
Adjust MinAccuracy , ForecastBars , and save parameters to file for reuse.
-
Usage Scenarios:
-
Scalping: Lower FastMAPeriod , RSIPeriod , StochKPeriod , ForecastBars , VoteThreshold .
-
Swing Trading: Increase SlowMAPeriod , ADXThreshold , BarsToAnalyze , VoteThreshold .
-
Training: Enable DebugMode , lower MinAccuracy , raise LearningRate .
-
Live Trading: Disable DebugMode , use defaults, periodically review accuracy.
Example (GBP/USD M5, no forecast candles, log shows “Low-confidence vote”, accuracy 0.55):
-
Lower VoteThreshold to 0.25
-
Lower MinAccuracy to 0.5
-
Increase LearningRate to 0.2
-
Reduce BarsToAnalyze to 30 if needed
-
Ensure H4 data is loaded
→ Forecast candles should start to appear after learning phase.
