Weekend RangeWeekend Range Indicator – Customizable High/Low Zones
🔹 Overview
The Weekend Range Indicator marks the last 20 weekends on your chart, highlighting their highs and lows with fully customizable colors, transparency, and time settings. This tool helps traders identify key support and resistance levels from weekend price action.
🛠️ Features
✅ Custom Weekend Start & End – Choose the weekend days and time (UTC)
✅ Automatically Tracks the Last 20 Weekends (configurable up to 50)
✅ Custom Box Colors & Transparency – Adjust the fill and border colors easily
✅ Works on All Timeframes – Best viewed on 1H, 4H, or higher
✅ Efficient & Optimized Code – No lag, smooth performance
🎯 How to Use
1️⃣ Add the indicator to your chart.
2️⃣ Adjust the weekend start & end time in the settings.
3️⃣ Customize the box colors and transparency to match your style.
4️⃣ Watch how price reacts around the weekend high/low zones for trade opportunities.
💡 Trading Strategies
🔹 Breakout Trading – Look for price breaking above or below the weekend range.
🔹 Reversal Zones – Watch for rejections at weekend highs/lows.
🔹 Liquidity & Stop Hunts – Large players often target these levels.
📈 Recommended Markets
✔ Works best on Forex, Crypto, Indices, and Commodities
✔ Ideal for swing traders and intraday traders
🚀 Enjoy using the indicator! Let me know if you’d like any new features added! 🎯🔥
Educational
Higher Highs, Higher Lows, Lower Highs, Lower Lows//@version=5
indicator("Higher Highs, Higher Lows, Lower Highs, Lower Lows", overlay=true)
// Lookback period for swing detection
length = input(36)
// Detect swing highs and lows
swingHigh = ta.highest(high, length) == high
swingLow = ta.lowest(low, length) == low
// Track previous highs and lows
var float prevHigh = na
var float prevLow = na
var float lastHigh = na
var float lastLow = na
if swingHigh
prevHigh := lastHigh
lastHigh := high
if swingLow
prevLow := lastLow
lastLow := low
// Determine structure: HH, HL, LH, LL
isHH = swingHigh and lastHigh > prevHigh
isHL = swingLow and lastLow > prevLow
isLH = swingHigh and lastHigh < prevHigh
isLL = swingLow and lastLow < prevLow
// Plot labels for HH, HL, LH, LL
labelOffset = 10
if isHH
label.new(x=time, y=high, text="HH", color=color.green, textcolor=color.white, size=size.small, style=label.style_label_down)
if isHL
label.new(x=time, y=low, text="HL", color=color.blue, textcolor=color.white, size=size.small, style=label.style_label_up)
if isLH
label.new(x=time, y=high, text="LH", color=color.red, textcolor=color.white, size=size.small, style=label.style_label_down)
if isLL
label.new(x=time, y=low, text="LL", color=color.orange, textcolor=color.white, size=size.small, style=label.style_label_up)
// Draw connecting lines
var line hhLine = na
var line hlLine = na
var line lhLine = na
var line llLine = na
if isHH
hhLine := line.new(x1=bar_index , y1=prevHigh, x2=bar_index, y2=lastHigh, width=2, color=color.green)
if isHL
hlLine := line.new(x1=bar_index , y1=prevLow, x2=bar_index, y2=lastLow, width=2, color=color.blue)
if isLH
lhLine := line.new(x1=bar_index , y1=prevHigh, x2=bar_index, y2=lastHigh, width=2, color=color.red)
if isLL
llLine := line.new(x1=bar_index , y1=prevLow, x2=bar_index, y2=lastLow, width=2, color=color.orange)
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 with DEMA Strategy (Reversal Enabled)Just simple Supertrend with DEMA filter strategy.
Just for daylytrading with optional disabling long and short positions
Bitcoin DCA Strategy ( CICIL BITCOIN ) - Khilman AhmadiSTRATEGY INI, MENSIMULASIKAN UNTUK CICIL BITCOIN SECARA DAILY PADA SAAT MARKET OPEN DAILY ,
Kenapa tidak ada transaksi ?
iyah karna disini kita hanya beli dan hold, jadi report summary nya bisa dilihat di tab- penguji strategi - kinerja,pada bagian hasil beli dan tahan - kita bisa melihat hasil berapa persen keuntungan / kerugian yg kita dapat.
masukan rentang data yang bakal di backtest.
usd per order
masukan modal ( isi 1000000 usd ) tergantung berapa order
masukan pyramid ( jumlah order bisa di isi 2000 ) - ini berarti 2000 hari ( dilebihin gpp )
Micha Stocks Custom Watermark (fixed offsetY by n.b)fixed Y offset so no overlap with other indicators.
special thanks to "micha stocks" for the idea.
SHIVBHAGWAN BUY SIGNALPlot EMAs: Plot the 9 and 15 EMAs on the chart.
Candle Conditions: Identify candles that form on the EMA and are crossed by the next candle.
Buy Signal: Generate a "Buy" signal when the next candle crosses the previous candle.
Stop Loss: Use the previous candle's low as the stop loss and label it as "SL".
Target: Calculate the target as 2x the stop loss points and label it as "TGT".
EMA Buy SignalPlot EMAs: Plot the 9 and 15 EMAs on the chart.
Candle Conditions: Identify candles that form on the EMA and are crossed by the next candle.
Buy Signal: Generate a "Buy" signal when the next candle crosses the previous candle.
Stop Loss: Use the previous candle's low as the stop loss and label it as "SL".
Target: Calculate the target as 2x the stop loss points and label it as "TGT".
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! 😊
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.
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.
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 *
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.