I see a HIPPO - P3This indicator displays HIPPO's as per Hopi's description in his Book.
HIDDEN
INTERBANK
PRICE
POINT
OBJECTIVE
Basically a HIPPO is a "Hidden" order block, where you take the wicks of 2 consecutive bars.
YOU DO NOT TAKE ANY 2 BARS, BUT THE BARS SHOULD CREATE A FVG!
HIPPOS can also act as support as resistance
Educational
Cash And Carry Arbitrage BTC Compare Month 6 by SeoNo1Detailed Explanation of the BTC Cash and Carry Arbitrage Script
Script Title: BTC Cash And Carry Arbitrage Month 6 by SeoNo1
Short Title: BTC C&C ABT Month 6
Version: Pine Script v5
Overlay: True (The indicators are plotted directly on the price chart)
Purpose of the Script
This script is designed to help traders analyze and track arbitrage opportunities between the spot market and futures market for Bitcoin (BTC). Specifically, it calculates the spread and Annual Percentage Yield (APY) from a cash-and-carry arbitrage strategy until a specific expiry date (in this case, June 27, 2025).
The strategy helps identify profitable opportunities when the futures price of BTC is higher than the spot price. Traders can then buy BTC in the spot market and short BTC futures contracts to lock in a risk-free profit.
1. Input Settings
Spot Symbol: The real-time BTC spot price from Binance (BTCUSDT).
Futures Symbol: The BTC futures contract that expires in June 2025 (BTCUSDM2025).
Expiry Date: The expiration date of the futures contract, set to June 27, 2025.
These inputs allow users to adjust the symbols or expiry date according to their trading needs.
2. Price Data Retrieval
Spot Price: Fetches the latest closing price of BTC from the spot market.
Futures Price: Fetches the latest closing price of BTC futures.
Spread: The difference between the futures price and the spot price (futures_price - spot_price).
The spread indicates how much higher (or lower) the futures price is compared to the spot market.
3. Time to Maturity (TTM) and Annual Percentage Yield (APY) Calculation
Current Date: Gets the current timestamp.
Time to Maturity (TTM): The number of days left until the futures contract expires.
APY Calculation:
Formula:
APY = ( Spread / Spot Price ) x ( 365 / TTM Days ) x 100
This represents the annualized return from holding a cash-and-carry arbitrage position if the trader buys BTC at the spot price and sells BTC futures.
4. Display Information Table on the Chart
A table is created on the chart's top-right corner showing the following data:
Metric: Labels such as Spread and APY
Value: Displays the calculated spread and APY
The table automatically updates at the latest bar to display the most recent data.
5. Alert Condition
This sets an alert condition that triggers every time the script runs.
In practice, users can modify this alert to trigger based on specific conditions (e.g., APY exceeds a threshold).
6. Plotting the APY and Spread
APY Plot: Displays the annualized yield as a blue line on the chart.
Spread Plot: Visualizes the futures-spot spread as a red line.
This helps traders quickly identify arbitrage opportunities when the spread or APY reaches desirable levels.
How to Use the Script
Monitor Arbitrage Opportunities:
A positive spread indicates a potential cash-and-carry arbitrage opportunity.
The larger the APY, the more profitable the arbitrage opportunity could be.
Timing Trades:
Execute a buy on the BTC spot market and simultaneously sell BTC futures when the APY is attractive.
Close both positions upon futures contract expiry to realize profits.
Risk Management:
Ensure you have sufficient margin to hold both positions until expiry.
Monitor funding rates and volatility, which could affect returns.
Conclusion
This script is an essential tool for traders looking to exploit price discrepancies between the BTC spot market and futures market through a cash-and-carry arbitrage strategy. It provides real-time data on spreads, annualized returns (APY), and visual alerts, helping traders make informed decisions and maximize their profit potential.
Supertrend Strategy with Money Ocean TradeStrategy Overview
The Supertrend Strategy with Trend Change Confirmation leverages the Supertrend indicator to identify potential buy and sell signals based on changes in trend direction and subsequent price action. The strategy is designed to work with any financial instrument (symbol) and aims to provide clear entry and exit signals.
Key Components
Supertrend Indicator: The core of this strategy is the Supertrend indicator, calculated using a length of 3 and a factor of 1. The Supertrend line is plotted on the chart to visually represent trend direction.
Direction 1: Indicates an uptrend (bullish).
Direction -1: Indicates a downtrend (bearish).
Trend Change Detection: The strategy monitors changes in the trend direction. When a trend change is detected, it checks if the next candle confirms the trend change by breaking above or below the Supertrend line.
Entry Conditions:
Long Entry (Buy): When the Supertrend direction changes to 1 (uptrend) and the next candle closes above the Supertrend line.
Short Entry (Sell): When the Supertrend direction changes to -1 (downtrend) and the next candle closes below the Supertrend line.
Exit Conditions: The strategy closes the position based on the opposite signal.
Long Exit: When the Supertrend direction changes to -1 (downtrend) and the next candle closes below the Supertrend line.
Short Exit: When the Supertrend direction changes to 1 (uptrend) and the next candle closes above the Supertrend line.
Visual Signals: The strategy plots buy and sell signals on the chart using plotshape:
BUY: A green label below the bar when a long entry is triggered.
SELL: A red label above the bar when a short entry is triggered.
Alerts: Alerts are set up to notify when a buy or sell signal is triggered.
Script Summary
This strategy helps traders identify potential trading opportunities based on trend changes and confirms the trend by checking the next candle's price action. The visual signals and dashboard enhance the user's ability to monitor and manage trades effectively.
Feel free to test and adjust the parameters to suit your trading preferences! If you need further customizations or explanations, let me know.
CCI, RSI, Volume & ATR Buy Signal - Go with the herd!📌 CCI, RSI, Volume & ATR Buy Signal Indicator
🚀 Identify Smart Entry Opportunities with a Multi-Confirmation Approach
This indicator combines CCI (Commodity Channel Index), RSI (Relative Strength Index), Volume, and ATR (Average True Range) to provide a reliable buy signal by ensuring the market conditions are favorable before entering a trade.
📊 How Does It Work?
This script evaluates market momentum, volatility, and trading volume to generate a clear entry decision:
✅ (Green Check) → Favorable entry conditions
❌ (Red Cross) → Not an ideal entry point
The indicator displays all the relevant metrics in one compact label, positioned above the most recent candle for quick and easy reference.
📈 Components of the Indicator
Each metric is visually represented using traffic light colors (🟢 Green, 🟡 Yellow, 🔴 Red) for intuitive decision-making:
1️⃣ CCI (Commodity Channel Index) – Momentum Strength
🟢 Strong: Market momentum is high (CCI above the entry threshold).
🟡 Moderate: Market is showing some movement, but not strong enough.
🔴 Weak: No significant momentum (CCI is low).
2️⃣ RSI (Relative Strength Index) – Trend Confirmation
If RSI is above the user-defined threshold, the momentum is considered positive for entry.
3️⃣ Volume – Market Participation
🟢 High: Trading volume is above the moving average, confirming strong participation.
🟡 Moderate: Volume is near its average, signaling indecisiveness.
🔴 Low: Weak participation, indicating potential false signals.
4️⃣ ATR (Average True Range) – Volatility Indicator
🟢 High: The market is moving with sufficient volatility for a strong trade setup.
🟡 Moderate: Acceptable volatility but with some caution.
🔴 Low: Market is slow, and price movements may be weak.
🔧 Customizable Settings
You can fine-tune the indicator to match your trading strategy by adjusting:
CCI Threshold for Entry (default: 100)
RSI Threshold for Entry (default: 50)
Volume Multiplier for Confirmation (default: 1.0)
ATR Multiplier for Confirmation (default: 1.0)
🖥️ How to Use
1️⃣ Add the indicator to your TradingView chart.
2️⃣ Look for the label above the most recent candle.
Example output:
✅ Vola: 🟢 Mom: 🟢 Volu: 🟢 → Strong confirmation for entry.
❌ Vola: 🟡 Mom: 🔴 Volu: 🟡 → Entry conditions are not favorable.
3️⃣ Only enter trades when ✅ appears and all or most indicators are green.
4️⃣ Avoid trading when ❌ is displayed or when multiple indicators are yellow/red.
⚡ Why Use This Indicator?
✅ Multi-Factor Confirmation – Ensures you enter only high-probability setups.
✅ Customizable for Any Strategy – Adjust thresholds based on your risk tolerance.
✅ Traffic Light System – Easily interpret trade conditions at a glance.
✅ Real-Time Updates – The label dynamically updates based on the latest price action.
📌 Final Notes
This indicator is not a standalone trading system but a powerful confirmation tool. Always use proper risk management and combine it with price action analysis for best results. 📊📈
Expiry Day Special IndicatorExpiry Day Special Indicator
The Expiry Day Special Indicator is designed to detect catalytic price action patterns that commonly occur between 9:15 AM to 10:15 AM (IST) in the Nifty & Bank Nifty markets but not limited to these specific markets. While these patterns are particularly useful on expiry days, they are not limited to expiry trading alone. They can also be applied on other trading days when similar conditions arise, making them versatile for intraday traders.
How It Works
This indicator scans for bullish and bearish price action patterns within the first trading hour and plots potential buy and sell signals based on key market structures.
• Bearish Patterns: Identifies strong rejection zones and weakness in price action to signal potential short trades.
• Bullish Patterns: Recognizes reversal formations that indicate potential long trade opportunities.
• Time Filter: The setup is valid only between 9:15 AM - 10:15 AM (IST) to focus on high-impact market moves.
Why This Indicator?
1. Specialized for Nifty & Bank Nifty – Designed specifically for Indian markets.
2. Early Trend Identification – Helps traders capture moves early in the session.
3. Works Beyond Expiry Days – Although optimized for expiry trading, it can also detect similar patterns on regular days.
📌 Note: This indicator does not provide trading advice; always use proper risk management.
Timeframe Display Table with CustomizationsPlaces a single cell table in the top right of the chart to display the currently viewed timeframe at all times on the chart.
Support Resistance - Percentile LevelsKey Features:
1. Percentile Calculations:
The indicator calculates the 95th percentile (PercentilePlot100) and the 5th percentile (PercentilePlot5) of the high and low prices over specified lengths.
The lengths for these calculations are adjustable via input fields, allowing users to customize the periods used for percentile calculations.
2. Percentile Levels:
Resistance Levels (R1, R2, R3, R4): Plots resistance levels based on the 95th percentile of the high prices over different lengths (100, 200, 750, 4500).
Support Levels (S1, S2, S3, S4): Plots support levels based on the 5th percentile of the low prices over different lengths (100, 200, 750, 4500).
3. High-Timeframe Average:
Calculates and plots the average of the 750-period high and low percentiles (htfavg), which acts as a pivot point on the chart.
How to Use This Indicator:
1. Identify Key Support and Resistance Levels:
Use the plotted resistance (R1, R2, R3, R4) and support (S1, S2, S3, S4) levels to identify key areas where price may reverse or consolidate.
2. Pivot Point Analysis:
The plotted pivot point (htfavg) can be used to identify potential areas of trend change or consolidation. It represents the average price level based on higher timeframe percentiles.
3. Trend Analysis:
By observing how price interacts with these percentile levels, traders can gain insights into market trends and potential reversal points.
Customization:
The input fields allow you to customize the lengths of the percentiles and the percentile plot values according to your trading strategy and timeframe preference.
In summary, this indicator can help traders identify significant support and resistance levels, potential pivot points, and overall market trends based on percentile calculations of high and low prices over various periods. This can be valuable for making informed trading decisions and setting entry and exit points.
If you have any specific questions or need further customization, feel free to ask! 😊
Trade SafeTrade Safe: The Ultimate Discipline Tool for Traders
Are you tired of overtrading, revenge trading, or letting emotions ruin your trading plan? Trade Safe is here to transform your trading psychology and help you achieve consistent profitability. Unlike traditional indicators that focus solely on market analysis, Trade Safe addresses the number one reason traders fail: lack of discipline.
With its innovative features, Trade Safe enforces strict trading rules, prevents emotional decision-making, and helps you stick to your plan—no matter how volatile the markets get. If you're serious about becoming a disciplined and profitable trader, this is the tool you've been waiting for.
Enforces Trading Discipline:
Trade Safe ensures you stick to your daily trading plan by visually blocking your charts after a predetermined number of trades or a stop-loss, Take profit event.
No more overtrading or deviating from your strategy—Trade Safe keeps you in check.
Eliminates Emotional Trading:
The screen block feature prevents you from seeing the candles after a loss, helping you avoid the emotional spiral of "tilt" and revenge trading.
This unique approach focuses on the psychological side of trading, which is often overlooked by other tools.
Simple and Intuitive Interface:
Easily set your stop-loss and take-profit level with the red line marker for stop-loss and green for take-profit and choose between long or short positions with just a few clicks.
Trade Safe is designed to be user-friendly, so you can focus on trading without distractions.
Customizable for All Trading Styles:
Whether you're a scalper, swing trader, or long-term investor, Trade Safe can be tailored to fit your strategy.
Set your stop-loss and take-profit, and let Trade Safe handle the rest.
Prevents Revenge Trading:
By locking your screen after a stop-loss, Trade Safe eliminates the temptation to "make back" losses through impulsive trades.
This helps you break the cycle of emotional trading and stay focused on your long-term goals.
Builds Healthy Trading Habits:
Trade Safe encourages you to walk away after a loss, reinforcing the importance of patience and discipline.
Ultimate Gold Correlation Matrix (Extended)This is a correlation matrix to help you visually understand the relationship between stocks. This is the correlation of the amount of change.
The color changes depending on the value of the correlation value.
By making a node diagram of this relationship, what has been difficult to understand may become clearer.
Good luck.
1. meaning of correlation coefficient
Correlation Coefficient ranges from -1 to +1.
Correlation Coefficient Value Interpretation
+1.00 Perfect positive correlation (when one goes up, the other always goes up)
+0.75 ~ +0.99 Strong positive correlation (fairly well linked)
+0.50 ~ +0.74 Moderate positive correlation
+0.30 ~ +0.49 Weak positive correlation
-0.30 ~ +0.30 No correlation (no or weak relationship)
-0.50 ~ -0.74 Moderate negative correlation
-0.75 ~ -0.99 Strong negative correlation (when one goes up, the other goes down)
-1.00 Perfect negative correlation (opposite moves)
Translated with www.DeepL.com (free version)
Ultimate Gold Correlation Matrix (Extended)This is a correlation matrix to help you visually understand the relationship between stocks. This is the correlation of the amount of change.
The color changes depending on the value of the correlation value.
By drawing a node diagram of this relationship, you may be able to clarify what has been difficult to understand so far.
Candle Riders CR1Overview
The **Candle Riders CR1** is an advanced trading tool designed to help traders anticipate potential market movements. It calculates three key levels – **Cpoint**, **Rpoint**, and **CRgap** – based on the high, low, and close values of the last 3 candles. These levels offer insights into possible price trends, reversals, and risk-to-reward scenarios, helping traders make more informed decisions.
This indicator is unique because it projects levels for the **next candle**, allowing traders to prepare for potential price movements rather than reacting to completed candles.
Key Features
1. **Cpoint**
- Indicates a potential price level for the next candle.
- If a **green signal** appears on the current candle, the upcoming candle might show an upward movement, with a tendency to reach the Cpoint.
- If a **red signal** appears, the next candle could show a downward movement towards the Cpoint.
2. **Rpoint**
- Represents a level where a trend reversal could occur.
- When the price reaches the Rpoint, it signals a potential change in direction.
- In case of a green signal, this could indicate a shift from an upward to a downward movement. Conversely, a red signal at the Rpoint might suggest a shift from downward to upward.
3. **CRgap**
- Reflects the distance between the last candle's closing price and the calculated Cpoint/Rpoint.
- It helps traders evaluate the risk-to-reward ratio for their potential trades.
- In case of a green signal, CRgap indicates the potential distance the price could move towards the Cpoint. If the price approaches the Rpoint, the same CRgap can guide target and stop levels.
- For a red signal, CRgap similarly represents the possible movement towards the Cpoint or a reversal at the Rpoint.
How It Works
The **Candle Riders CR1** uses a mathematical formula to calculate levels from the last 3 candles’ high, low, and close values. These levels provide a forward-looking view, projecting possible price movements for the **next candle**:
- **Green Signal on Current Candle**: Suggests a positive trend in the upcoming candle, with the price likely to move towards the Cpoint. The CRgap indicates the expected price movement, helping to set a risk-to-reward framework. If the price reaches the Rpoint, a reversal may occur, suggesting a change in direction.
- **Red Signal on Current Candle**: Implies a negative trend for the next candle, with the price tending to move towards the Cpoint. Here too, the CRgap helps assess risk and reward. If the price touches the Rpoint, a reversal might take place, indicating a potential upward movement.
- **Position Management**: If neither Cpoint nor Rpoint is reached, it is advisable to conclude the position when the current candle closes. However, if the same signal continues, the position can be carried forward to the next candle, although the levels for Cpoint, Rpoint, and CRgap will change.
Special Aspects
- **Predictive Analysis**: Unlike conventional indicators, CR1 calculates potential levels for the **next candle**, enabling traders to anticipate market movements.
- **Dynamic Updates**: Levels are recalculated with each new candle, ensuring relevance to evolving market conditions.
- **Multi-Time Frame Compatibility**: Suitable for all time frames, catering to intraday, swing, and positional traders.
Recommended Time Frames
Based on our **observations and back-testing**, the **Candle Riders CR1** has shown **consistent and reliable performance on the 15-minute, 30-minute, and 1-hour time frames**. These intervals appear to provide a balanced view of market movements, capturing trends effectively while minimizing noise.
While the indicator is versatile and can be used across various time frames, these specific durations have demonstrated a **higher degree of accuracy** and **clearer signal interpretation**.
It is important to note that past performance is not a guarantee of future results. Traders are encouraged to explore and adapt the time frames according to their trading style and risk appetite.
How to Use on
1. **Trend Anticipation**: Observe the signal on the current candle:
- **Green Signal**: Anticipate an upward movement in the next candle towards the Cpoint. Use CRgap to evaluate the potential movement. If the price approaches the Rpoint, it signals a potential reversal.
- **Red Signal**: Expect a downward movement in the next candle towards the Cpoint, using CRgap for risk-to-reward assessment. A reversal may occur if the price reaches the Rpoint.
2. **Reversal Indication**: The Rpoint serves as a crucial level for identifying potential trend reversals.
3. **Risk Management**: Utilize CRgap to set target and risk levels, aligning trades with calculated risk-to-reward ratios.
4. **Position Closure and Carry Forward**:
- If no significant movement occurs, consider closing the position at the candle’s end.
- If the same signal persists, the position can be carried forward to the next candle, keeping in mind that levels will be recalculated.
Important Notes
- The levels (Cpoint, Rpoint, CRgap) are calculated for the **next candle**, not the current one.
- Once the current candle closes, new levels are calculated, ensuring that the indicator remains forward-looking.
- These levels are meant to provide context and should be used as a guiding tool along with other trading strategies.
Disclaimer
The **Candle Riders CR1** indicator uses mathematical calculations to project potential price levels. These projections are for **informational and educational purposes only** and are not recommendations or guarantees of future price movements.
- Cpoint and Rpoint levels are based on historical market data and indicate potential price movement or reversal areas.
- CRgap helps traders evaluate risk-to-reward scenarios but should not be the sole basis for trading decisions.
- All trading decisions should be made with independent analysis and proper risk management.
Why It’s Special
1. **Forward-Looking Projections**: It predicts potential levels for the next candle, offering an anticipatory trading advantage.
2. **Dynamic Adaptation**: The indicator adapts to changing market conditions, recalculating levels with each new candle.
3. **Comprehensive Risk Analysis**: By calculating CRgap, it provides a clear framework for evaluating risk-to-reward ratios.
4. **Versatile Application**: Compatible with all time frames and markets, making it adaptable for different trading strategies.
5. **Suggested Time Frames**: Based on our experience, the **15-minute, 30-minute, and 1-hour** time frames have shown consistent and reliable performance.
BPR [TakingProphets]The BPR (Balanced Price Range) Indicator by Taking Prophets is built for traders who follow ICT (Inner Circle Trader) concepts and smart money strategies. In ICT methodology, a Balanced Price Range (BPR) occurs when price rapidly moves in one direction, creating an imbalance that often gets revisited before price continues its trend. These areas represent inefficiencies in the market where liquidity was not properly distributed, making them key zones for potential retracements and trade setups.
How the Indicator Works:
🔹 Automatically Detects BPRs – No need to manually mark imbalances; the indicator highlights them for you.
🔹 Helps Identify Smart Money Footprints – Spot areas where price is likely to retrace and rebalance liquidity.
🔹 Customizable Sensitivity – Adjust detection parameters based on your preferred trading style.
🔹 Works Across All Markets – Apply it to Forex, Futures, Crypto, and Stocks on TradingView.
🔹 Clean and Intuitive Interface – Designed to be simple yet powerful for both new and experienced traders.
The Ultimate Lot Size Calculator Backstory
I created this Pine Script tool to calculate lot sizes with precision. While there are many lot size calculators available on TradingView, I found that most had significant flaws. I started teaching myself Pine Script over three and a half years ago with the sole purpose of building this tool. My first version was messy and lacked accuracy, so I never published it. I wanted it to be better than any other available tool, but my limited knowledge back then held me back.
Recently, I received a request to create a similar tool, as the current options still fail to deliver the precision and reliability traders need. This inspired me to revisit my original idea. With improved skills and a better understanding of Pine Script, I redesigned the tool from scratch, making it as precise, reliable, and efficient as possible.
This tool features built-in error detection to minimize mistakes and ensure accuracy in lot size calculations. I've spent more time on this project than on any other, focusing on delivering a solution that stands out on TradingView. While I plan to add more features based on user feedback, the current version is already a powerful, dependable, and easy-to-use tool for traders who value precision and efficiency in their lot size calculations.
How to use the tool ?
At first it might seem complicated, but it is quite easy to use the tool. There are two modes: auto and manual. By default, the tool is set on manual mode. When you apply the tool on the chart, it will ask you to choose the entry price, then the stop-loss price, and at last the take-profit price. Select all of them one by one. These values can be changed later.
Settings
There are various setting given for making the tool as flexible as possible. Here is the explanation for some of most important settings. Play with them and make yourself comfortable.
General settings
Auto mode : Use this mode if you want the the risk reward to be fixed and stop loss to be based on ATR. However the stop loss can be changed to be based on user input.
Manual mode : Use this mode if you want full control over entry, stop loss and take profit.
Contract Size : The tool works perfectly for all forex pairs including gold and silver but as the contract size is different for different assets it is difficult to add every single asset into the script manually so i have provided this option. In case you want to calculate lot size for a asset other then forex, gold or silver make sure to change this. Contract size = Quantity of the asset in 1 standerd lot.
Account settings
Automatic mode settings and ATR stop settings
Manual mode settings
Table and risk-reward box settings are pretty much self-explanatory i guess.
Error handling
A lot size calculator is a complex program. There are numerous points where it may fail and produce incorrect results. To make it robust and accurate, these issues must be addressed and managed properly, which practically all existing lot size calculator scripts fail to do.
Golden tip
When the symbol is changed it will display a symbol change warning as the entry, stop loss and take profit price won't change.
There are 2 ways to get fix this. Either manually enter all three values which i hate the most or remove the script from the chart and re-apply the script on chart again.
So to re-apply the indicator in most easy way follow the following instructions:
Note : If you encounter any other error then read the instruction to fix it and if it is an unknow error pleas report it to me in comments or DM.
Boilerplate Configurable Strategy [Yosiet]This is a Boilerplate Code!
Hello! First of all, let me introduce myself a little bit. I don't come from the world of finance, but from the world of information and communication technologies (ICT) where we specialize in data processing with the aim of automating it and eliminating all human factors and actors in the processes. You could say that I am an algotrader.
That said, in my journey through trading in recent years I have understood that this world is often shown to be incomplete. All those who want to learn about trading only end up learning a small part of what it really entails, they only seek to learn how to read candlesticks. Therefore, I want to share with the entire community a fraction of what I have really understood it to be.
As a computer scientist, the most important thing is the data, it is the raw material of our work and without data you simply cannot do anything. Entropy is simple: Data in -> Data is transformed -> Data out.
The quality of the outgoing data will directly depend on the incoming data, there is no greater mystery or magic in the process. In trading it is no different, because at the end of the day it is nothing more than data. As we often say, if garbage comes in, garbage comes out.
Most people focus on the results only, on the outgoing data, because in the end we all want the same thing, to make easy money. Very few pay attention to the input data, much less to the process.
Now, I am not here to delude you, because there is no bigger lie than easy money, but I am here to give you a boilerplate code that will help you create strategies where you only have to concentrate on the quality of the incoming data.
To the Point
The code is a strategy boilerplate that applies the technique that you decide to customize for the criteria for opening a position. It already has the other factors involved in trading programmed and automated.
1. The Entry
This section of the boilerplate is the one that each individual must customize according to their needs and knowledge. The code is offered with two simple, well-known strategies to exemplify how the code can be reused for your own benefits.
For the purposes of this post on tradingview, I am going to use the simplest of the known strategies in trading for entries: SMA Crossing
// SMA Cross Settings
maFast = ta.sma(close, length)
maSlow = ta.sma(open, length)
The Strategy Properties for all cases published here:
For Stock TSLA H1 From 01/01/2025 To 02/15/2025
For Crypto XMR-USDT 30m From 01/01/2025 To 02/15/2025
For Forex EUR-USD 5m From 01/01/2025 To 02/15/2025
But the goal of this post is not to sell you a dream, else to show you that the same Entry decision works very well for some and does not for others and with this boilerplate code you only have to think of entries, not exits.
2. Schedules, Days, Sessions
As you know, there are an infinite number of markets that are susceptible to the sessions of each country and the news that they announce during those sessions, so the code already offers parameters so that you can condition the days and hours of operation, filter the best time parameters for a specific market and time frame.
3. Data Filtering
The data offered in trading are numerical series presented in vectors on a time axis where an endless number of mathematical equations can be applied to process them, with matrix calculation and non-linear regressions being the best, in my humble opinion.
4. Read Fundamental Macroeconomic Events, News
The boilerplate has integration with the tradingview SDK to detect when news will occur and offers parameters so that you can enable an exclusion time margin to not operate anything during that time window.
5. Direction and Sense
In my experience I have found the peculiarity that the same algorithm works very well for a market in a time frame, but for the same market in another time frame it is only a waste of time and money. So now you can easily decide if you only want to open LONG, SHORT or both side positions and know how effective your strategy really is.
6. Reading the money, THE PURPOSE OF EVERYTHING
The most important section in trading and the reason why many clients usually hire me as a financial programmer, is reading and controlling the money, because in the end everyone wants to win and no one wants to lose. Now they can easily parameterize how the money should flow and this is the genius of this boilerplate, because it is what will really decide if an algorithm (Indicator: A bunch of math equations) for entries will really leave you good money over time.
7. Managing the Risk, The Ego Destroyer
Many trades, little money. Most traders focus on making money and none of them know about statistics and the few who do know something about it, only focus on the winrate. Well, with this code you can unlock what really matters, the true success criteria to be able to live off of trading: Profit Factor, Sortino Ratio, Sharpe Ratio and most importantly, will you really make money?
8. Managing Emotions
Finally, the main reason why many lose money is because they are very bad at managing their emotions, because with this they will no longer need to do so because the boilerplate has already programmed criteria to chase the price in a position, cut losses and maximize profits.
In short, this is a boilerplate code that already has the data processing and data output ready, you only have to worry about the data input.
“And so the trader learned: the greatest edge was not in predicting the storm, but in building a boat that could not sink.”
DISCLAIMER
This post is intended for programmers and quantitative traders who already have a certain level of knowledge and experience. It is not intended to be financial advice or to sell you any money-making script, if you use it, you do so at your own risk.
SPY vs TQQQ Candle Divergence# SPY vs TQQQ Candle Divergence Indicator
## Description
This indicator monitors and visualizes candlestick divergences between SPY (S&P 500 ETF) and TQQQ (ProShares UltraPro QQQ ETF). It identifies situations where one security is showing bullish movement (green candle) while the other is showing bearish movement (red candle) within the same time period.
## Features
- Real-time divergence detection between SPY and TQQQ
- Visual markers with distinct colors for each type of divergence
- Built-in alert conditions for automated monitoring
- Works on any timeframe
- Overlay indicator that plots directly on the chart
## Divergence Types
### SPY Bullish / TQQQ Bearish
- Condition: SPY forms a green candle while TQQQ forms a red candle
- Marker: Green label with "SPY" text above the bar
- Alert Message: "SPY is green while TQQQ is red"
### SPY Bearish / TQQQ Bullish
- Condition: SPY forms a red candle while TQQQ forms a green candle
- Marker: Red label with "SPY" text below the bar
- Alert Message: "TQQQ is green while SPY is red"
### TQQQ Bullish / SPY Bearish
- Visualization: Blue label with "TQQQ" text above the bar
- Indicates TQQQ strength relative to SPY
### TQQQ Bearish / SPY Bullish
- Visualization: Purple label with "TQQQ" text below the bar
- Indicates TQQQ weakness relative to SPY
## Technical Implementation
- Built on Pine Script version 5
- Uses `request.security()` to fetch data for both symbols
- Implements simple candle color detection (1 for green, -1 for red, 0 for doji)
- Plots markers using `plotshape()` with different colors and positions
## Visual Elements
- Label Colors:
- SPY Bullish: Green
- SPY Bearish: Red
- TQQQ Bullish: Blue
- TQQQ Bearish: Purple
- All labels use white text for visibility
- Small label size for clean chart appearance
- Labels positioned above/below bars for clear identification
## Alert System
Two built-in alert conditions:
1. "SPY Green TQQQ Red Divergence"
2. "TQQQ Green SPY Red Divergence"
## Usage
1. Add the indicator to any chart (preferably SPY or TQQQ)
2. Look for colored labels indicating divergences
3. Set up alerts for automated monitoring
4. Use divergences as potential signals for:
- Market sector rotation
- Relative strength analysis
- Trading opportunities
- Risk management
## Notes
- Best used in conjunction with other technical indicators
- Consider overall market conditions when interpreting signals
- Useful for identifying potential market reversals or continuations
- Can help in timing entries and exits
## Limitations
- Requires data feed for both SPY and TQQQ
- Only considers candle color, not candle size or volume
- May generate frequent signals in choppy markets
## Disclaimer
This indicator is for informational purposes only. Always use proper risk management and consider multiple factors when making trading decisions.
Smart ChannelThe "Smart Channel" indicator is designed to dynamically identify and plot price channels on a chart. It uses a statistical approach based on Pearson's correlation coefficient to determine the best-fit channel for both short-term and long-term trends. This allows traders to visualize potential support and resistance levels, identify trend direction, and potentially anticipate breakouts or reversals.
How it Works:
Data Input: The indicator takes a source input (typically the closing price) as the basis for its calculations.
Period Selection: It defines two sets of lookback periods: one for short-term analysis and one for long-term analysis. The code iterates through these periods, calculating a linear regression and standard deviation for each.
Pearson's Correlation: For each period, the indicator calculates Pearson's R, which measures the strength and direction of the linear relationship between price and time. A higher absolute value of Pearson's R indicates a stronger trend.
Best Fit Channel: The indicator identifies the period with the highest Pearson's R for both short-term and long-term and uses the corresponding linear regression parameters (slope and intercept) to define the midline of the channel.
Standard Deviation: The standard deviation of the price data around the regression line is calculated. This is used to define the upper and lower boundaries of the channel. The channel width is controlled by a "Deviation Multiplier" input.
Channel Plotting: The indicator plots the midline, upper boundary, and lower boundary of the channel on the chart. Separate channels are plotted for the short-term and long-term best-fit periods, using different colors for easy visual distinction.
Dynamic Updates: The channel is dynamically updated as new price data becomes available, adjusting to the evolving market trend.
Key Inputs and Settings:
Source: The price data used for calculations (e.g., close, open, high, low, etc.).
Use Long-Term Channel: A boolean input to enable/disable the calculation and plotting of the long-term channel.
Deviation Multiplier: Controls the width of the channel (how many standard deviations away from the midline the boundaries are).
Channel/Midline Colors and Transparency: Customizable colors and transparency levels for the channel lines and fill.
Line Styles: Options for solid, dotted, or dashed lines for the channel boundaries and midline.
Extend Style: How the channel lines should extend (right, both, none, left).
Interpretation and Usage:
Trend Identification: The direction of the midline indicates the prevailing trend. An upward-sloping midline suggests an uptrend, while a downward-sloping midline suggests a downtrend.
Support and Resistance: The upper and lower channel boundaries can act as potential support and resistance levels.
Breakouts: A price move outside of the channel boundaries may signal a potential breakout or reversal.
Overbought/Oversold: Prices touching or exceeding the upper boundary might suggest an overbought condition, while prices touching or exceeding the lower boundary might suggest an oversold condition.
Short-Term vs. Long-Term: Comparing the short-term and long-term channels can provide insights into the overall market context. For example, a short-term uptrend within a long-term downtrend might suggest a potential buying opportunity before the larger trend resumes.
IPO Date ScreenerThis script, the IPO Date Screener, allows traders to visually identify stocks that are relatively new, based on the number of bars (days) since their IPO. The user can set a custom threshold for the number of days (bars) after the IPO, and the script will highlight new stocks that fall below that threshold.
Key Features:
Customizable IPO Days Threshold: Set the threshold for considering a stock as "new." Since Pine screener limits number bars to 500, it will work for stocks having trading days below 500 since IPO which almost 2 years.
Column Days since IPO: Sort this column from low to high to see newest to oldest STOCK with 500 days of trading.
Since a watchlist is limited to 1000 stocks, use this pines script to screen stocks within the watch list having trading days below 500 or user can select lower number of days from settings.
This is not helpful to add on chart, this is to use on pine screener as utility.
IronCondor 10am 30TF by RMThe IronCondor 10am 30TF indicator shows Iron Condor trades win rate over a large number of days.
The default ETFs in this indicators are "QQQ", "SPY", "RUT" , "CBTX" and "SPX", other entries have not been tested.
Iron Condor quick explanation:
- Iron Condors trades have four options, generally, are based around a Midpoint price (Current Market Price Strike) and
- Two equally distances Strikes for the SELL components (called the Body of the Iron Condor)
- Further away from the two SELLs, another Two BUYs for protection (not considered in this indicator)
- Iron Condors are used for Passive Income based on small gains most of the time.
The IronCondor 10am 30TF has its logic created based on the premises that:
- Most days the market prices stay within a range.
- As example the S&P market prices would stay within 1% on about 80% of the time
- The moving markets (bullish or bearish) occur about 20% of the time
- The biggest market price volatility generally occurs before market opens and then around the first hour or so of trade in the day.
- After the first hour or so of the market the prices would be most likely to stay within a range.
The operation is simple:
- At the Trade Star time in the day (say 10:30 Hrs.) draws a vertical yellow line, then
- Creates two blue horizontal lines for the SELL limits in the Iron Condor Body, at +/- 1% price boundary (check Ticker list below for values)
- At the Trade End time (say 16:00 Hrs.) checks that none of the SELL limits have been broken by highs or lows during the trade day
(The check is done calculating at Trade End time the high/lows 10 bars back for 30 min TF - timeframe)
- There is a label at each Trade End time with Win/Loss and Body value.
- There is one final label with overall calculated past performance in Win percentage out of 'n' trades
Defaults and User Entries:
- The User can modify the Midpoint price called 'IronCondor Midpoint STRIKE' (default is the Candle Close at the selected time)
- The User can modify the Body value called 'IronCondor Body' (default is the Ticker's selected value as per list below)
"QQQ" or "SPY" Body = 5
"RUT" or "CBTX" Body = 20
"SPX" Body = 60
* Disclaimer: This is not a Financial tool, it cannot used as any kind of advice to invest or risk moneys in any market,
Markets are volatile in nature - with little or no warning - and will drain your account if you are not careful.
Use only as an academic demonstrator => * Use at your own risk *
[TehThomas] - Market Open StatusThe Market Open Status indicator is designed to help traders quickly determine whether the major financial markets—London, New York, and Asia—are currently open or closed. It does this by displaying a table on the chart with real-time status updates based on the UTC offsets you configure in the settings.
Key Features:
✅ Automatic Time Adjustments – The indicator automatically updates the displayed market times when you adjust the Chart UTC Offset in the settings.
✅ Configurable UTC Offsets – You can manually set both the Chart UTC Offset (for the trading pair's timezone) and your Local UTC Offset to ensure accurate time conversions.
✅ Live Market Status Display – The table clearly indicates whether the London, New York, and Asia markets are currently Open (green) or Closed (red).
✅ Daylight Savings Time (DST) Adjustments – The indicator automatically detects if any market is in DST and adjusts the market times accordingly.
✅ Real-Time Local Time Display – It also provides a live clock showing the current time based on your local UTC offset.
How to Set Up the Indicator Correctly
It is important to select the correct UTC offset that matches the market’s timezone for the asset you are trading.
To find the correct offset, look at the top left of your TradingView chart, where the market open symbol (green or red dot) is displayed.
The timezone displayed there corresponds to the asset’s market timezone—enter this value as your Chart UTC Offset in the indicator settings.
(You can't see the red or green dot on the screenshot but it should be displayed in that location.)
Set Your Local UTC Offset
Enter the UTC offset for your location to enable proper local time conversion in the table.
The Indicator Will Adjust the Market Open/Close Times Automatically
Once the correct UTC offsets are set, the indicator will automatically update and display the correct market times relative to your local time.
This tool is extremely useful for traders who want to stay informed about global market sessions and plan their trades accordingly. Proper setup ensures accurate market hours, reducing confusion and helping with time-sensitive trading strategies. 🚀
Forward Curve Visualization ToolProvide the spot symbol and the futures product root, and the script automatically scans all relevant contracts for you—no more tedious manual searches. The result is a clean, intuitive chart showing the live forward curve in real time.
It also detects contango or backwardation conditions (based on spot < F1 < F2 < F3).
Future Features:
Plot historical snapshots of the curve (1 day, 1 week, or 1 month ago) to understand market trends over time.
Display additional metrics such as annualized basis, cost of carry (CoC), and even volume or open interest for deeper insights.
If you trade futures and watch the forward curve, this script will give you the actionable data you need and get more ideas or features you’d like to see. Let’s build them together!
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Son Model ICT [TradingFinder] HTF DOL H1 + Sweep M15 + FVG M1🔵 Introduction
The ICT Son Model setup is a precise trading strategy based on market structure and liquidity, implemented across multiple timeframes. This setup first identifies a liquidity level in the 1-hour (1H) timeframe and then confirms a Market Structure Shift (MSS) in the 5-minute (5M) timeframe to validate the trend. After confirmation, the price forms a new swing in the 5-minute timeframe, absorbing liquidity.
Once this level is broken, traders typically drop to the 30-second (30s) timeframe and enter trades based on a Fair Value Gap (FVG). However, since access to the 30-second timeframe is not available to most traders, we take the entry signal directly from the 5-minute timeframe, using the same liquidity zones and confirmed breakouts to execute trades. This approach simplifies execution and makes the strategy accessible to all traders.
This model operates in two setups :
Bullish ICT Son Model and Bearish ICT Son Model. In the bullish setup, liquidity is first accumulated at the lows of the 1-hour timeframe, and after confirming a market structure shift, a long position is initiated. Conversely, in the bearish setup, liquidity is first drawn from higher levels, and upon confirmation of a bearish trend, a short position is executed.
Bullish Setup :
Bearish Setup :
🔵 How to Use
The ICT Son Model setup is designed around liquidity analysis and market structure shifts and can be applied in both bullish and bearish market conditions. The strategy first identifies a liquidity level in the 1-hour (1H) timeframe and then confirms a Market Structure Shift (MSS) in the 5-minute (5M) timeframe.
After this shift, the price forms a new swing, absorbing liquidity. When this level is broken in the 5-minute timeframe, the trader enters based on a Fair Value Gap (FVG). While the ideal entry is in the 30-second (30s) timeframe, due to accessibility constraints, we take entry signals directly from the 5-minute timeframe.
🟣 Bullish Setup
In the Bullish ICT Son Model, the 1-hour timeframe first identifies liquidity at the market lows, where price sweeps this level to absorb liquidity. Then, in the 5-minute timeframe, an MSS confirms the bullish shift.
After confirmation, the price forms a new swing, absorbing liquidity at a higher level. The price then retraces into a Fair Value Gap (FVG) created in the 5-minute timeframe, where the trader enters a long position, placing the stop-loss below the FVG.
🟣 Bearish Setup
In the Bearish ICT Son Model, liquidity at higher market levels is identified in the 1-hour timeframe, where price sweeps these levels to absorb liquidity. Then, in the 5-minute timeframe, an MSS confirms the bearish trend.
After confirmation, the price forms a new swing, absorbing liquidity at a lower level. The price then retraces into a Fair Value Gap (FVG) created in the 5-minute timeframe, where the trader enters a short position, placing the stop-loss above the FVG.
🔵 Settings
Swing period : You can set the swing detection period.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Back : You can set the number of swings that will go back for checking.
FVG Length : Default is 120 Bar.
MSS Length : Default is 80 Bar.
FVG Filter : This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.
Types of FVG filters :
Very Aggressive Filter: Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
Aggressive Filter: Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
Defensive Filter: Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
Very Defensive Filter: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
🔵 Conclusion
The ICT Son Model setup is a structured and precise method for trade execution based on liquidity analysis and market structure shifts. This strategy first identifies a liquidity level in the 1-hour timeframe and then confirms a trend shift using the 5-minute timeframe.
Trade entries are executed based on Fair Value Gaps (FVGs), which highlight optimal entry points. By applying this model, traders can leverage existing market liquidity to enter high-probability trades. The bullish setup activates when liquidity is swept from market lows and a market structure shift confirms an upward trend, whereas the bearish setup is used when liquidity is drawn from market highs, confirming a downtrend.
This approach enables traders to identify high-probability trade setups with greater precision compared to many other strategies. Additionally, since access to the 30-second timeframe is limited, the strategy remains fully functional in the 5-minute timeframe, making it more practical and accessible for a wider range of traders.
Cluster Reversal Zones📌 Cluster Reversal Zones – Smart Market Turning Point Detector
📌 Category : Public (Restricted/Closed-Source) Indicator
📌 Designed for : Traders looking for high-accuracy reversal zones based on price clustering & liquidity shifts.
🔍 Overview
The Cluster Reversal Zones Indicator is an advanced market reversal detection tool that helps traders identify key turning points using a combination of price clustering, order flow analysis, and liquidity tracking. Instead of relying on static support and resistance levels, this tool dynamically adjusts to live market conditions, ensuring traders get the most accurate reversal signals possible.
📊 Core Features:
✅ Real-Time Reversal Zone Mapping – Detects high-probability market turning points using price clustering & order flow imbalance.
✅ Liquidity-Based Support/Resistance Detection – Identifies strong rejection zones based on real-time liquidity shifts.
✅ Order Flow Sensitivity for Smart Filtering – Filters out weak reversals by detecting real market participation behind price movements.
✅ Momentum Divergence for Confirmation – Aligns reversal zones with momentum divergences to increase accuracy.
✅ Adaptive Risk Management System – Adjusts risk parameters dynamically based on volatility and trend state.
🔒 Justification for Mashup
The Cluster Reversal Zones Indicator contains custom-built methodologies that extend beyond traditional support/resistance indicators:
✔ Smart Price Clustering Algorithm: Instead of plotting fixed support/resistance lines, this system analyzes historical price clustering to detect active reversal areas.
✔ Order Flow Delta & Liquidity Shift Sensitivity: The tool tracks real-time order flow data, identifying price zones with the highest accumulation or distribution levels.
✔ Momentum-Based Reversal Validation: Unlike traditional indicators, this tool requires a momentum shift confirmation before validating a potential reversal.
✔ Adaptive Reversal Filtering Mechanism: Uses a combination of historical confluence detection + live market validation to improve accuracy.
🛠️ How to Use:
• Works well for reversal traders, scalpers, and swing traders seeking precise turning points.
• Best combined with VWAP, Market Profile, and Delta Volume indicators for confirmation.
• Suitable for Forex, Indices, Commodities, Crypto, and Stock markets.
🚨 Important Note:
For educational & analytical purposes only.
Stochastic-Dynamic Volatility Band ModelThe Stochastic-Dynamic Volatility Band Model is a quantitative trading approach that leverages statistical principles to model market volatility and generate buy and sell signals. The strategy is grounded in the concepts of volatility estimation and dynamic market regimes, where the core idea is to capture price fluctuations through stochastic models and trade around volatility bands.
Volatility Estimation and Band Construction
The volatility bands are constructed using a combination of historical price data and statistical measures, primarily the standard deviation (σ) of price returns, which quantifies the degree of variation in price movements over a specific period. This methodology is based on the classical works of Black-Scholes (1973), which laid the foundation for using volatility as a core component in financial models. Volatility is a crucial determinant of asset pricing and risk, and it plays a pivotal role in this strategy's design.
Entry and Exit Conditions
The entry conditions are based on the price’s relationship with the volatility bands. A long entry is triggered when the price crosses above the lower volatility band, indicating that the market may have been oversold or is experiencing a reversal to the upside. Conversely, a short entry is triggered when the price crosses below the upper volatility band, suggesting overbought conditions or a potential market downturn.
These entry signals are consistent with the mean reversion theory, which asserts that asset prices tend to revert to their long-term average after deviating from it. According to Poterba and Summers (1988), mean reversion occurs due to overreaction to news or temporary disturbances, leading to price corrections.
The exit condition is based on the number of bars that have elapsed since the entry signal. Specifically, positions are closed after a predefined number of bars, typically set to seven bars, reflecting a short-term trading horizon. This exit mechanism is in line with short-term momentum trading strategies discussed in literature, where traders capitalize on price movements within specific timeframes (Jegadeesh & Titman, 1993).
Market Adaptability
One of the key features of this strategy is its dynamic nature, as it adapts to the changing volatility environment. The volatility bands automatically adjust to market conditions, expanding in periods of high volatility and contracting when volatility decreases. This dynamic adjustment helps the strategy remain robust across different market regimes, as it is capable of identifying both trend-following and mean-reverting opportunities.
This dynamic adaptability is supported by the adaptive market hypothesis (Lo, 2004), which posits that market participants evolve their strategies in response to changing market conditions, akin to the adaptive nature of biological systems.
References:
Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654.
Bollinger, J. (1980). Bollinger on Bollinger Bands. Wiley.
Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. Journal of Finance, 48(1), 65-91.
Lo, A. W. (2004). The Adaptive Markets Hypothesis: Market Efficiency from an Evolutionary Perspective. Journal of Portfolio Management, 30(5), 15-29.
Poterba, J. M., & Summers, L. H. (1988). Mean Reversion in Stock Prices: Evidence and Implications. Journal of Financial Economics, 22(1), 27-59.