GOLD Volume-Based Entry StrategyShort Description:
This script identifies potential long entries by detecting two consecutive bars with above-average volume and bullish price action. When these conditions are met, a trade is entered, and an optional profit target is set based on user input. This strategy can help highlight momentum-driven breakouts or trend continuations triggered by a surge in buying volume.
How It Works
Volume Moving Average
A simple moving average of volume (vol_ma) is calculated over a user-defined period (default: 20 bars). This helps us distinguish when volume is above or below recent averages.
Consecutive Green Volume Bars
First bar: Must be bullish (close > open) and have volume above the volume MA.
Second bar: Must also be bullish, with volume above the volume MA and higher than the first bar’s volume.
When these two bars appear in sequence, we interpret it as strong buying pressure that could drive price higher.
Entry & Profit Target
Upon detecting these two consecutive bullish bars, the script places a long entry.
A profit target is set at current price plus a user-defined fixed amount (default: 5 USD).
You can adjust this target, or you can add a stop-loss in the script to manage risk further.
Visual Cues
Buy Signal Marker appears on the chart when the second bar confirms the signal.
Green Volume Columns highlight the bars that fulfill the criteria, providing a quick visual confirmation of high-volume bullish bars.
Works fine on 1M-2M-5M-15M-30M. Do not use it on higher TF. Due the lack of historical data on lower TF, the backtest result is limited.
Forecasting
Dynamic 200 EMA with Trend-Based ColoringDescription:
This script plots the 200-period Exponential Moving Average (EMA) and dynamically changes its color based on the trend direction. The script helps traders quickly identify whether the price is above or below the 200 EMA, which is widely used as a long-term trend indicator.
How It Works:
The script calculates the 200 EMA based on the closing price.
If the price is above the EMA, it suggests a bullish trend, and the EMA line turns green.
If the price is below the EMA, it suggests a bearish trend, and the EMA line turns red.
An optional background color is added to enhance visual clarity, highlighting the current trend direction.
Use Cases:
Trend Confirmation: Helps traders determine if the overall trend is bullish or bearish.
Support and Resistance: The 200 EMA is often used as dynamic support/resistance.
Entry & Exit Signals: Traders can use crossovers with the 200 EMA as potential trade signals.
This script is designed for traders looking for a simple yet effective way to incorporate trend visualization into their charts. It is fully open-source and can be customized to fit individual trading strategies.
RSI XTR with selective candle color by Edwin KThis tradingView indicator named "RSI XTR with selective candle color", which modifies the candle colors on the chart based on RSI (Relative Strength Index) conditions. Here's how it works:
- rsiPeriod: Defines the RSI calculation period (default = 5).
- rsiOverbought: RSI level considered overbought (default = 70).
- rsiOversold: RSI level considered oversold (default = 30).
- These values can be modified by the user in the settings.
RSI Calculation
- Computes the RSI value using the ta.rsi() function on the closing price (close).
- The RSI is a momentum indicator that measures the magnitude of recent price changes.
Conditions for Candle Coloring
- when the RSI is above the overbought level.
- when the RSI is below the oversold level.
How It Works in Practice
- When the RSI is above 70 (overbought) → Candles turn red.
- When the RSI is below 30 (oversold) → Candles turn green.
- If the RSI is between 30 and 70, the candle keeps its default color.
This helps traders quickly spot potential reversal zones based on RSI momentum.
RSI Buy/Sell SignalBuy sell base on RSI 4
Buy when RSI close above 68
Sell when RSI of candle close below 32
Apply for XAUUSD
Dynamic Trendline (NEW)This indicator marks the last high and lows, easier for verification of trend.
EMA & Bollinger BandsThis indicator combines three main functionalities into a single script:
1. Exponential Moving Average (EMA):
- Purpose: Calculates and plots the EMA of a chosen price source.
- Inputs:
- EMA Length: The period for the EMA calculation.
- EMA Source: The price series (such as close) used for the EMA.
- EMA Offset: Allows shifting the EMA line left or right on the chart.
- Output: A blue-colored EMA line plotted on the chart.
2. Smoothing MA on EMA:
- Purpose: Applies a secondary moving average (MA) on the previously calculated EMA. There is also an option to overlay Bollinger Bands on this smoothed MA.
- Inputs:
- Smoothing MA Type: Options include "None", "SMA", "SMA + Bollinger Bands", "EMA", "SMMA (RMA)", "WMA", and "VWMA".
- Selecting "None" disables this feature.
- Choosing "SMA + Bollinger Bands" will additionally plot Bollinger Bands around the smoothed MA.
- Smoothing MA Length: The period used to calculate the smoothing MA.
- BB StdDev for Smoothing MA: The standard deviation multiplier for the Bollinger Bands (applies only when "SMA + Bollinger Bands" is selected).
- Calculation Details:
- The chosen MA type is applied to the EMA value.
- If Bollinger Bands are enabled, the script computes the standard deviation of the EMA over the smoothing period, multiplies it by the specified multiplier, and then plots an upper and lower band around the smoothing MA.
- Output:
- A yellow-colored smoothing MA line.
- Optionally, green-colored upper and lower Bollinger Bands with a filled background if the "SMA + Bollinger Bands" option is selected.
3. Bollinger Bands on Price:
- Purpose: Independently calculates and plots traditional Bollinger Bands based on a moving average of a selected price source.
- Inputs:
- BB Length: The period for calculating the moving average that serves as the basis of the Bollinger Bands.
- BB Basis MA Type: The type of moving average to use (options include SMA, EMA, SMMA (RMA), WMA, and VWMA).
- BB Source: The price series (such as close) used for the Bollinger Bands calculation.
- BB StdDev: The multiplier for the standard deviation used to calculate the upper and lower bands.
- BB Offset: Allows shifting the Bollinger Bands left or right on the chart.
- Calculation Details:
- The script computes a basis line using the selected MA type on the chosen price source.
- The standard deviation of the price over the specified period is then multiplied by the provided multiplier to determine the distance for the upper and lower bands.
- Output:
- A basis line (typically drawn in a blue tone), an upper band (red), and a lower band (teal).
- The area between the upper and lower bands is filled with a semi-transparent blue background for easier visualization.
---
How It Works Together
- Integration:
The script is divided into clearly labeled sections for each functionality. All parts are drawn on the same chart (overlay mode enabled), providing a comprehensive view of market trends.
- Customization:
Users can adjust parameters for the EMA, the smoothing MA (and its optional Bollinger Bands), as well as the traditional Bollinger Bands independently. This allows for flexible customization depending on the trader's strategy or visual preference.
- Utility:
Combining these three analyses into one indicator enables traders to view:
- The immediate trend via the EMA.
- A secondary smoothed trend that might help reduce noise.
- A volatility measure through Bollinger Bands on both the price and the smoothed EMA.
---
This combined indicator is useful for technical analysis by providing both trend-following (EMA and smoothing MA) and volatility indicators (Bollinger Bands) in one streamlined tool.
Live Forex Calendar by NachodogAdded alerts that fire before and after new events from Forex Factory.
Based on the original news alert code from toodegrees.
Relative Strength Comparison 1//@version=5
indicator("Relative Strength Comparison", overlay=false)
// User Inputs
numSymbol = input.symbol("NSE:TCS", "Numerator Symbol") // Numerator security
denSymbol = input.symbol("NSE:INFY", "Denominator Symbol") // Denominator security
// Fetch security prices
numPrice = request.security(numSymbol, timeframe.period, close)
denPrice = request.security(denSymbol, timeframe.period, close)
// Calculate Relative Strength (RS)
relativeStrength = numPrice / denPrice
// Plot Relative Strength Line
plot(relativeStrength, title="Relative Strength Line", color=color.blue, linewidth=2)
DCA KuCoin Strategy Backtesting [ScrimpleAI]This script is a backtester for a Dollar Cost Averaging (DCA) strategy on KuCoin, developed for TradingView. It allows users to simulate recurring investments in an asset, test different configurations, and find the best parameters to maximize performance. The script provides a detailed simulation of a DCA strategy, analyzing the impact of different configurations on investments over time. It is designed to be open-source on TradingView, offering a free tool to optimize the use of DCA bots on KuCoin.
Strategy Settings
The script uses an initial capital of 10,000 euros and sets a commission of 0.07 percent per trade. The invested amount is set as a percentage of equity, supporting up to 100 open trades simultaneously. Orders are processed at the close of each candle, and trading is conducted in euros.
Customizable Parameters
The script allows users to choose the investment interval, ranging from a minimum of one hour to a maximum of two weeks. Users can set the amount invested per trade, with a default value of 1,000 USDT and a minimum of 2 USDT. A maximum investment limit can also be defined, preventing further trades once this limit is reached. Additionally, a profit target is available, expressed as a percentage, indicating the profit level at which all positions will be closed.
Backtesting Period Selection
Users can select a specific time range to test the strategy. The bot will execute trades only within this period.
Strategy Logic
The bot makes the first purchase when no trades are open, using the current closing price to calculate the quantity of assets to buy. Subsequent purchases occur at the specified frequency, provided the invested capital does not exceed the set maximum limit. When total equity surpasses the initial value plus the profit target, the bot closes all positions to secure the profit. A check is implemented to prevent errors related to opening and closing trades simultaneously.
Error Management
The script ensures that the selected timeframe is compatible with the chosen investment interval. If the timeframe is too high compared to the investment frequency, an error is triggered. Additionally, if available capital becomes negative, the script stops execution and suggests modifying the test parameters.
Seasonality Forecast: Predicting Market Trends with HistoricaThis Pine Script indicator analyzes **seasonal price patterns** based on historical data. It calculates **average price movements** over a user-defined lookback period (default: 5 years) and projects them into the future (default: 365 days). The script accounts for **election cycles**, allowing users to filter by election years, pre-election years, or post-election years. It tracks **trading days, weeks, and months**, smoothing the seasonal trend and adjusting for price scale.
MACD + ATR Dynamic Stop-Loss StrategyThis strategy combines momentum (MACD), trend confirmation (EMA), and volatility-based risk management (ATR) for a robust trading approach.
John Bob-Trading-BotDeveloped by Ayebale John Bob with the help of his bestie, this innovative strategy combines advanced Smart Money Concepts with practical risk management tools to help traders identify and capitalize on key market moves.
Key Features:
Smart Money Concepts & Fair Value Gaps (FVG):
The strategy monitors price action for fair value gaps, which are visualized as extremely faint horizontal lines on the chart. These FVGs signal potential areas where institutional traders might have entered or exited positions.
Dynamic Entry Signals:
Buy signals are triggered when the price crosses above the 50-bar lowest low or when a bullish FVG is detected. Conversely, sell signals are generated when the price falls below the 50-bar highest high or a bearish FVG is identified. Each signal is visually marked on the chart with clear buy (green) and sell (red) labels.
Multi-Level Order Execution:
Once an entry signal occurs, the strategy places five separate orders, each with its own take-profit (TP) level. The TP levels are calculated dynamically using the Average True Range (ATR) and a set of predefined multipliers. This allows traders to scale out of positions as the market moves favorably.
Dynamic Risk Management:
A stop-loss is automatically set at a distance determined by the ATR, ensuring that risk is managed in accordance with current market volatility.
Real-Time Trade Information Table:
In the bottom-right corner of the chart, a trade information table displays essential details about the current trade:
Side: Displays "BUY NOW" (with a dark green background) for long entries or "SELL NOW" (with a dark red background) for short entries.
Entry Price & Stop-Loss: Shows the entry price (highlighted in green) and the corresponding stop-loss level (highlighted in red).
Take-Profit Levels: Lists the five TP levels, each of which turns green once the market price reaches that target.
Timer: A live timer in minutes counts from the moment the current trade trigger started, helping traders track the duration of their active trades.
Visual Progress Bar:
A histogram-style progress bar is plotted on the chart, visually representing the percentage gain (or loss) relative to the entry price.
This strategy was meticulously designed to incorporate both technical analysis and smart risk management, offering a robust trading solution that adapts to changing market conditions. Whether you're a seasoned trader or just starting out, the AyebaleJohnBob Trading Bot equips you with the tools and visual cues needed to make well-informed trading decisions. Enjoy a seamless blend of strategy and style—crafted with passion by Ayebale John Bob and his bestie!
First 9:15-9:20 Candle Levels (Daily)This indicator captures the closing price of the first 5-minute candle (9:15 - 9:20 AM) every trading day. It then calculates 0.09% above and below this closing price and plots horizontal lines. The indicator resets daily at 9:15 AM, ensuring it always tracks the latest market open. After 9:20 AM, the calculated levels remain visible throughout the day. The upper level is displayed in green, while the lower level is in red. This tool helps traders identify key price levels early in the session, useful for setting stop-losses, take-profit zones, or identifying potential breakout points.
Machine Learning SupertrendThe Machine Learning Supertrend is an advanced trend-following indicator that enhances the traditional Supertrend with Gaussian Process Regression (GPR) and kernel-based learning. Unlike conventional methods that rely purely on historical ATR values, this indicator integrates machine learning techniques to dynamically estimate volatility and forecast future price movements, resulting in a more adaptive and robust trend detection system.
At the core of this indicator lies Gaussian Process Regression (GPR), which utilizes a Radial Basis Function (RBF) kernel to model price distributions and anticipate future trends. Instead of simply looking at past price action, it constructs a kernel matrix, enabling a probabilistic approach to price forecasting. This allows the indicator to not only detect current trends but also project potential trend reversals with greater accuracy.
By applying machine learning to ATR estimation, the ML Supertrend dynamically adjusts its thresholds based on predicted values rather than a fixed multiplier. This makes the trend signals more responsive to market conditions, reducing false signals and minimizing whipsaws often seen with traditional Supertrend indicators. The upper and lower bands are no longer static but evolve based on the underlying price structure, improving the reliability of trend shifts.
When the price crosses these adaptive levels, the indicator detects a trend change and plots it accordingly. Green signifies a bullish trend, while red indicates a bearish one. Alerts can also be triggered when the trend shifts, allowing traders to react quickly to potential reversals.
What makes this approach powerful is its ability to adapt to different market conditions. Traditional ATR-based methods use fixed parameters that might not always be optimal, whereas this ML-driven Supertrend continuously refines its estimations based on real-time data. The result is a more intelligent, less lagging, and highly adaptive trend-following tool.
This indicator is particularly useful for traders looking to enhance trend-following strategies with AI-driven insights. It reduces noise, improves signal reliability, and even offers a degree of trend forecasting, making it ideal for those who want a more advanced and dynamic alternative to standard Supertrend indicators.
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, and past performance is not indicative of future results. Trading involves risk, and users should conduct their own research and use proper risk management before making investment decisions.
Ultimate Stochastics Strategy by NHBprod Use to Day Trade BTCHey All!
Here's a new script I worked on that's super simple but at the same time useful. Check out the backtest results. The backtest results include slippage and fees/commission, and is still quite profitable. Obviously the profitability magnitude depends on how much capital you begin with, and how much the user utilizes per order, but in any event it seems to be profitable according to backtests.
This is different because it allows you full functionality over the stochastics calculations which is designed for random datasets. This script allows you to:
Designate ANY period of time to analyze and study
Choose between Long trading, short trading, and Long & Short trading
It allows you to enter trades based on the stochastics calculations
It allows you to EXIT trades using the stochastics calculations or take profit, or stop loss, Or any combination of those, which is nice because then the user can see how one variable effects the overall performance.
As for the actual stochastics formula, you get control, and get to SEE the plot lines for slow K, slow D, and fast K, which is usually not considered.
You also get the chance to modify the smoothing method, which has not been done with regular stochastics indicators. You get to choose the standard simple moving average (SMA) method, but I also allow you to choose other MA's such as the HMA and WMA.
Lastly, the user gets the option of using a custom trade extender, which essentially allows a buy or sell signal to exist for X amount of candles after the initial signal. For example, you can use "max bars since signal" to 1, and this will allow the indicator to produce an extra sequential buy signal when a buy signal is generated. This can be useful because it is possible that you use a small take profit (TP) and quickly exit a profitable trade. With the max bars since signal variable, you're able to reenter on the next candle and allow for another opportunity.
Let me know if you have any questions! Please take a look at the performance report and let me know your thoughts! :)
Gold Pro StrategyHere’s the strategy description in a chat format:
---
**Gold (XAU/USD) Trend-Following Strategy**
This **trend-following strategy** is designed for trading gold (XAU/USD) by combining moving averages, MACD momentum indicators, and RSI filters to capture sustained trends while managing volatility risks. The strategy uses volatility-adjusted stops to protect gains and prevent overexposure during erratic price movements. The aim is to take advantage of trending markets by confirming momentum and ensuring entries are not made at extreme levels.
---
**Key Components**
1. **Trend Identification**
- **50 vs 200 EMA Crossover**
- **Bullish Trend:** 50 EMA crosses above 200 EMA, and the price closes above the 200 EMA
- **Bearish Trend:** 50 EMA crosses below 200 EMA, and the price closes below the 200 EMA
2. **Momentum Confirmation**
- **MACD (12,26,9)**
- **Buy Signal:** MACD line crosses above the signal line
- **Sell Signal:** MACD line crosses below the signal line
- **RSI (14 Period)**
- **Bullish Zone:** RSI between 50-70 to avoid overbought conditions
- **Bearish Zone:** RSI between 30-50 to avoid oversold conditions
3. **Entry Criteria**
- **Long Entry:** Bullish trend, MACD bullish crossover, and RSI between 50-70
- **Short Entry:** Bearish trend, MACD bearish crossover, and RSI between 30-50
4. **Exit & Risk Management**
- **ATR Trailing Stops (14 Period):**
- Initial Stop: 3x ATR from entry price
- Trailing Stop: Adjusts to lock in profits as price moves favorably
- **Position Sizing:** 100% of equity per trade (high-risk strategy)
---
**Key Logic Flow**
1. **Trend Filter:** Use the 50/200 EMA relationship to define the market's direction
2. **Momentum Confirmation:** Confirm trend momentum with MACD crossovers
3. **RSI Validation:** Ensure RSI is within non-extreme ranges before entering trades
4. **Volatility-Based Risk Management:** Use ATR stops to manage market volatility
---
**Visual Cues**
- **Blue Line:** 50 EMA
- **Red Line:** 200 EMA
- **Green Triangles:** Long entry signals
- **Red Triangles:** Short entry signals
---
**Strengths**
- **Clear Trend Focus:** Avoids counter-trend trades
- **RSI Filter:** Prevents entering overbought or oversold conditions
- **ATR Stops:** Adapts to gold’s inherent volatility
- **Simple Rules:** Easy to follow with minimal inputs
---
**Weaknesses & Risks**
- **Infrequent Signals:** 50/200 EMA crossovers are rare
- **Potential Missed Opportunities:** Strict RSI criteria may miss some valid trends
- **Aggressive Position Sizing:** 100% equity allocation can lead to large drawdowns
- **No Profit Targets:** Relies on trailing stops rather than defined exit targets
---
**Performance Profile**
| Metric | Expected Range |
|----------------------|---------------------|
| Annual Trades | 4-8 |
| Win Rate | 55-65% |
| Max Drawdown | 25-35% |
| Profit Factor | 1.8-2.5 |
---
**Optimization Recommendations**
1. **Increase Trade Frequency**
Adjust the EMAs to shorter periods:
- `emaFastLen = input.int(30, "Fast EMA")`
- `emaSlowLen = input.int(150, "Slow EMA")`
2. **Relax RSI Filters**
Adjust the RSI range to:
- `rsiBullish = rsi > 45 and rsi < 75`
- `rsiBearish = rsi < 55 and rsi > 25`
3. **Add Profit Targets**
Introduce a profit target at 1.5% above entry:
```pine
strategy.exit("Long Exit", "Long",
stop=longStopPrice,
profit=close*1.015, // 1.5% target
trail_offset=trailOffset)
```
4. **Reduce Position Sizing**
Risk a smaller percentage per trade:
- `default_qty_value=25`
---
**Best Use Case**
This strategy excels in **strong trending markets** such as gold rallies during economic or geopolitical crises. However, during sideways or choppy market conditions, the strategy might require manual intervention to avoid false signals. Additionally, integrating fundamental analysis—like monitoring USD weakness or geopolitical risks—can enhance its effectiveness.
---
This strategy offers a balanced approach for trading gold, combining trend-following principles with risk management tailored to the volatility of the market.
SASDv2rSensitive Altcoin Season Detector V2
This Pine Script™ code, titled "SASDv2r" (Sensitive Altcoin Season Detector version 2 revised), is designed for cryptocurrency trading analysis on the TradingView platform and tailored for those interested in tracking when altcoins might be outperforming Bitcoin, potentially indicating a market shift towards altcoins.
Feel free to use and modify. If you made it better, please let me know. Intention was to help the community with a tool for retail traders have no access to advanced, MV indicators. Solution uses classic TA only.
Use it witl TOTAL3/BTC indicator.
Please check: it gave signal just before last alt season % rose more than 250%.
Market Cap Data Fetching: The script fetches market capitalization data for Bitcoin, Ethereum, and all other altcoins (excluding Bitcoin and Ethereum) using request.security function.
Altcoin to Bitcoin Ratio: It calculates the ratio of total market cap of altcoins to Bitcoin's market cap (altToBtcRatio), which is central to identifying an "altcoin season."
Moving Averages: Several moving averages are computed for different time frames (50-day SMA, 200-day SMA, 20-day SMA, and 10-day EMA) to analyze trends in the altcoin to Bitcoin ratio.
Momentum Indicators: The script uses RSI (Relative Strength Index) and MACD (Moving Average Convergence Divergence) to gauge momentum and potential reversal points in the market.
Custom Indicators: It includes Volume Weighted Moving Average (VWMA) and a custom momentum indicator (altMomentum and altMomentumAvg) to provide additional insights into market movements.
Volatility Measurement: Bollinger Bands are calculated to assess volatility in the altcoin to Bitcoin ratio, which helps identify periods of high or low market activity.
Visual Analysis: Various plots are added to the chart for visual interpretation, including the altcoin to Bitcoin ratio, different moving averages, and Bollinger Bands.
Alt Season Detection: The script defines conditions for detecting when an "altcoin season" might be starting, based on crossovers of moving averages, RSI levels, MACD signals, and other custom criteria.
Performance Tracking: After signaling an alt season, the script evaluates the performance over the next 30 days by checking if there's been an increase in the altcoin to Bitcoin ratio, adding labels for positive or negative trends.(this one is in progress). Logic still gives false signals and aim is to identify failed signals.
Visual Signals: Labels are placed on the chart to visually indicate the beginning of a potential alt season or the performance outcome after a signal, aiding traders in making informed decisions.
Autocorrelation Price Forecasting Backtesting [ScrimpleAI]This script presents an innovative trading backtesting strategy designed to leverage autocorrelation models and linear regression on historical price returns . The goal is to forecast future price movements, identify recurring market cycles, and optimize trading decisions.
Main Functionality
This backtesting script is built to simulate trades by integrating historical autocorrelation with dynamic price forecasting . It incorporates risk management, stop-loss features, and an advanced backtesting date range, providing traders with maximum flexibility for evaluating strategies.
Key Features
1. Customizable Date Range for Backtesting
Allows users to define the exact date period for backtesting their strategies, ensuring they can fine-tune results for specific historical scenarios.
- Inputs: Start and End dates (day, month, year).
2. Autocorrelation Price Forecasting
- Detects cycles in market movements using the `ta.correlation` function.
- Highlights significant cycles when the autocorrelation exceeds a threshold value (default: 0.50).
- Stores projected values based on autocorrelation and linear regression of percentage returns for enhanced forecasting accuracy.
3. Forecast Threshold and Profit Assessment
- Evaluates hypothetical gains by comparing forecasted future prices to the current price.
- Customizable threshold gains to determine minimum profitability requirements for opening trades.
4. Strategy Side
- Long or Short Mode: Users can choose to test either long or short strategies to align with their trading approach.
5. Risk and Trade Management
- Order Sizing: Adjust position size as a percentage of the portfolio.
- Stop-Loss Integration: Dynamically calculates stop-loss based on user-defined percentages.
- Take Profit Target: Automatically sets take-profit levels based on forecasted gains.
6. Visual Alerts
- Provides clear visual signals of long and short entries on the chart, including labels and dynamic coloring.
- Forecasted prices are displayed directly on the chart as a continuous line, enhancing decision-making clarity.
Practical Applications
1. Cycle Detection: Utilize autocorrelation to identify repetitive market behaviors and cycles.
2. Forecasting for Backtesting: Simulate trades and assess the profitability of various strategies based on future price predictions.
3. Risk Management: Test different stop-loss and take-profit configurations.
4. Custom Period Analysis: Evaluate strategy performance in specific historical market conditions using the date range filter.
Core Logic Walkthrough
1. Autocorrelation for Cycle Detection:
- Historical prices are analyzed for recurring patterns using the `ta.correlation` function.
- If a significant cycle is detected (above the `signal_threshold`), the `linreg_values` (linear regression of returns) are stored for price projection.
2. Future Price Estimation: Forecasted price is calculated based on linear regression values and current price movements.
3. Trade Entry Logic
Long Trades
- Triggered if the hypothetical gain exceeds the threshold gain.
- Sets a take-profit level based on the projected future price.
- Includes an optional stop-loss based on user-defined percentages.
Short Trades
- Triggered if the hypothetical gain is less than the negative of the threshold gain.
- Configures take-profit and stop-loss levels for bearish trades.
4. Risk Management
- Position Sizing: Automatically calculates the order size as a percentage of the portfolio.
- Stop-Loss: Dynamically adjusts stop-loss levels to minimize risk.
5. Date Range Filtering: Ensures trades are executed only within the defined backtesting period.
Example Use Case: Backtesting with Autocorrelation
- A trader analyzes a 6-month period using 50 historical bars for autocorrelation.
- Sets a threshold gain of 10% and enables a stop-loss at 5%.
- Evaluates the effectiveness of a long-only strategy in this period to assess its profitability and risk-adjusted performance.
If you find this strategy useful or have ideas for improvements, leave a comment! What new features would you like to see in this strategy?
TrendMasterPro_FekonomiTrend Change and Start Signals with Weighted Conditions
The Trend Change and Start Signals with Weighted Conditions indicator leverages various technical analysis tools to generate reliable buy and sell signals. This indicator helps investors more accurately identify trend changes and start signals in the market.
Features:
Utilizes popular technical analysis tools such as MACD, RSI, EMA, and Ichimoku Cloud.
Enhances signal accuracy with additional indicators like ADX and Volume Increase.
Allows users to adjust the weights of each condition to set their importance.
The Confidence Level parameter lets you adjust the accuracy rate of the signals.
Visual Signals make it easy to track buy and sell points directly on the chart.
How It Works:
Condition Weights: Users assign weights to indicators like MACD, RSI, EMA, and Ichimoku Cloud. If you have no idea, use default settings.
Condition Fulfillment: Checks if the conditions for each indicator are met.
Confidence Level: The total weight of the fulfilled conditions must exceed the user-defined confidence level.
Signal Generation: When these conditions are met, a buy or sell signal is generated and visually displayed on the chart.
Customization:
Personalize Signals: By adjusting the weights of the indicators used, you can personalize the signals to match your trading strategy and preferences.
Use Cases:
Short-Term Investments: Identify quick trend changes for short-term trading decisions.
Long-Term Investments: Detect long-term trend starts and changes for strategic investment decisions.
Technical Analysis: Combine different technical analysis tools for more comprehensive and reliable analyses.
With this indicator, you can better understand market movements and make more informed investment decisions. Try it now and enhance your trading strategy!
by Fekonomi
Institutional Moves DetectorIndicator Name: Institutional Pattern Detector
What It Does:
Trend Following: It uses a Moving Average (MA) to understand the general direction of the price. The MA is like a smoothed-out line of the price over time, showing if the price trend is going up or down.
Volatility Measurement: The script employs Bollinger Bands (BB) to see how much the price is fluctuating. Bollinger Bands create an upper and lower "channel" around the price, which gets wider or narrower based on how volatile the price is.
Volume Check: It looks at trading volume to find times when there's unusually high activity, which could mean big players (institutions like banks or funds) are trading. It flags this when the volume is 1.5 times more than the average volume of the last 100 bars.
Pattern Detection for Trading Signals:
Entry Signal ("IN"): When there's high volume and the price is above the upper Bollinger Band, it suggests there might be strong buying from big institutions. This could mean the price might keep going up.
EXIT Signal ("OUT"): If there's high volume and the price falls below the lower Bollinger Band, it indicates possible strong selling pressure from institutions, suggesting the price might go down.
Visual Cues:
An orange label "IN" appears below the price bar for entry signals.
A red label "OUT" appears above the price bar for exit signals.
The moving average line is plotted on the chart in orange to help you see the trend.
Alerts: The script can alert you when these entry or exit signals occur, so you can get notifications without needing to stare at the chart all day.
For New Traders:
This indicator helps you spot when big traders might be influencing the market, potentially giving you a clue about when to enter or exit.
Remember, this is one tool among many. You should not base your trading solely on this; combine it with other analysis methods.
It's always wise to practice with a demo account before using real money to get a feel for how these signals work in actual market conditions.
VFV Correction Levels
This Pine Script, "VFV Correction Levels," identifies significant daily price corrections and calculates corresponding investments based on fixed thresholds (paliers). Key features include:
Six predefined correction levels trigger investments between $150 and $600 based on the percentage drop.
Larger corrections correspond to higher investment amounts.
Graphical Indicators:
Visual labels mark correction levels and display investment amounts directly on the chart.
Investment Tracking:
Calculates total invested and tracks performance (yield percentage) relative to the initial correction price.
Combo The "Combo" Indicator is a visual tool for TradingView that allows traders to clearly display their analysis based on OrderBloque concepts.
Key points to understand:
The indicator does NOT perform automatic market analysis
It serves as a configurable visualization tool for your personal analysis
Key Features:
Manual Configuration: You select a timeframe and function for each variable (V1 to V4)
Function Options:
VC (Volume Confirmation)
FP (Fractal Point)
LI (Liquidity)
EX (Execution)
Combinations like VC, VC, VC (EX)
Timeframe Range: Selectable from 5 minutes to 1 month
Tabular Display: Shows your inputs in a clear table on the chart
Customizable Appearance: Adjustable table position, colors, and text size