Clean Signal StrategyVersion: Pine Script v6
Type: Trend-Following Strategy
Best Used On: Intraday and Swing Timeframes
Built For: Clear, actionable buy/sell signals with visual lines for entries, targets, and stop loss.
Strategy Overview
The Clean Signal Strategy is designed to provide traders with crystal-clear buy/sell signals while reducing chart noise. It combines reliable indicators like EMA, VWAP, MACD, and ATR to identify high-probability trend-based trades.
The strategy runs in the background, only showing actionable signals when all conditions align, making it beginner-friendly and visually clean.
Indicators Used
EMA 9 & EMA 20 – Determines short-term momentum and trend direction.
VWAP (Volume-Weighted Average Price) – Confirms institutional interest and value area.
MACD Histogram – Confirms momentum direction.
Previous Day’s High/Low – Validates breakout or breakdown conditions.
ATR (14) – Used to set dynamic stop loss and targets.
✅ Buy Signal Criteria
A Buy signal is triggered when:
Price is above EMA 9, EMA 20, and VWAP
MACD Histogram is positive (momentum bullish)
Current price breaks previous day’s high
📍 When a buy signal occurs:
Green candle is painted
Entry, Stop Loss, and Targets 1-3 lines are drawn
Labels appear at the right end of each line
❌ Sell Signal Criteria
A Sell signal is triggered when:
Price is below EMA 9, EMA 20, and VWAP
MACD Histogram is negative (momentum bearish)
Current price breaks previous day’s low
📍 When a sell signal occurs:
Red candle is painted
Entry, Stop Loss, and Targets 1-3 lines are drawn
Labels appear at the right end of each line
⏸️ Neutral/Sideways Zones
If conditions for neither buy nor sell are met, the chart paints gray candles.
This helps traders avoid false entries and stay disciplined.
📋 On-Chart Signal Table
The strategy includes a floating table showing:
Current signal: Buy, Sell, or Neutral
Explanation of the signal based on indicator conditions
Real-time values of all key indicators: EMA9, EMA20, VWAP, MACD Hist, ATR, and previous high/low
This makes it easy to understand why a signal was triggered.
🎯 Target and Stop Loss Logic
Stop Loss: 1× ATR from entry
Target 1: 1× ATR
Target 2: 2× ATR
Target 3: 3× ATR
📌 Highlights
Clear visual lines and labels for easy understanding
No clutter — all signals and analysis are background-powered
Strong risk-reward based on volatility
Best used in trending markets or after consolidation breaks
These levels adjust dynamically based on market volatility, offering flexible trade management.
⚠️ Disclaimer
This strategy is for educational purposes only. Always do your own research before trading or investing.
Penunjuk Breadth
Trend ChannelThis is a Pine Script code written in version 6 for creating a trend channel indicator on TradingView. The indicator is called "Trend Channel" and is credited to "NachomixCrypto." Here's an explanation of what the code does:
Input Parameters
upperMult: Multiplier for the upper channel line, default is 2.0.
lowerMult: Multiplier for the lower channel line, default is -2.0.
useUpperDev: Boolean to activate/deactivate the upper deviation line. Default is false.
useLowerDev: Boolean to activate/deactivate the lower deviation line. Default is false.
showPearson: Boolean to show or hide Pearson's correlation coefficient (R). Default is true.
extendLines: Boolean to extend the channel lines to the right. Default is false.
len: Length (number of bars) to calculate the slope and deviations, default is 50.
src: Source data for the indicator, default is "close".
Line Customization Inputs
baseColor: Color for the base (middle) channel line, default is white.
upperColor: Color for the upper channel line, default is green.
lowerColor: Color for the lower channel line, default is red.
lineThickness: Thickness of the channel lines, default is 1.
Core Functions
calcSlope(): Calculates the slope (rate of change) for the given source over a specified length. It uses the least squares method to calculate the line of best fit.
slope: The rate of change.
average: The average value of the source data.
intercept: The intercept where the line crosses the Y-axis.
calcDev(): Calculates the standard deviation and Pearson's correlation coefficient (R) for the given source. It also computes the upper and lower deviations.
stdDev: Standard deviation, representing how much the data deviates from the mean.
pearsonR: Pearson's correlation coefficient, which measures the linear correlation between the source data and the regression line.
upDev: Upper deviation (difference from the highest value).
dnDev: Lower deviation (difference from the lowest value).
Main Logic
The code then calculates the upper and lower channel lines based on the calculated slope, intercept, and deviations.
Upper and lower start prices are adjusted using the multipliers and deviations, either based on the user inputs or the standard deviation.
Base, upper, and lower lines are drawn on the chart using the calculated prices. These lines represent the trend channel.
Pearson's R Label
The Pearson's R value is displayed as a label on the chart if showPearson is true. It is positioned at the lowest point between the upper and lower lines.
Debugging Plot
A small debugging circle is plotted above the bar to indicate whether the Pearson's R is valid and being calculated.
Final Notes
The trend channel dynamically adjusts based on price action and can be extended for future price movements.
The Pearson's R value gives an indication of how well the regression line fits the price data.
Range Filter Buy and Sell 5min## **Enhanced Range Filter Strategy: A Comprehensive Overview**
### **1. Introduction**
The **Enhanced Range Filter Strategy** is a powerful technical trading system designed to identify high-probability trading opportunities while filtering out market noise. It utilizes **range-based trend filtering**, **momentum confirmation**, and **volatility-based risk management** to generate precise entry and exit signals. This strategy is particularly useful for traders who aim to capitalize on trend-following setups while avoiding choppy, ranging market conditions.
---
### **2. Key Components of the Strategy**
#### **A. Range Filter (Trend Determination)**
- The **Range Filter** smooths price fluctuations and helps identify clear trends.
- It calculates an **adjusted price range** based on a **sampling period** and a **multiplier**, ensuring a dynamic trend-following approach.
- **Uptrends:** When the current price is above the range filter and the trend is strengthening.
- **Downtrends:** When the price falls below the range filter and momentum confirms the move.
#### **B. RSI (Relative Strength Index) as Momentum Confirmation**
- RSI is used to **filter out weak trades** and prevent entries during overbought/oversold conditions.
- **Buy Signals:** RSI is above a certain threshold (e.g., 50) in an uptrend.
- **Sell Signals:** RSI is below a certain threshold (e.g., 50) in a downtrend.
#### **C. ADX (Average Directional Index) for Trend Strength Confirmation**
- ADX ensures that trades are only taken when the trend has **sufficient strength**.
- Avoids trading in low-volatility, ranging markets.
- **Threshold (e.g., 25):** Only trade when ADX is above this value, indicating a strong trend.
#### **D. ATR (Average True Range) for Risk Management**
- **Stop Loss (SL):** Placed **one ATR below** (for long trades) or **one ATR above** (for short trades).
- **Take Profit (TP):** Set at a **3:1 reward-to-risk ratio**, using ATR to determine realistic price targets.
- Ensures volatility-adjusted risk management.
---
### **3. Entry and Exit Conditions**
#### **📈 Buy (Long) Entry Conditions:**
1. **Price is above the Range Filter** → Indicates an uptrend.
2. **Upward trend strength is positive** (confirmed via trend counter).
3. **RSI is above the buy threshold** (e.g., 50, to confirm momentum).
4. **ADX confirms trend strength** (e.g., above 25).
5. **Volatility is supportive** (using ATR analysis).
#### **📉 Sell (Short) Entry Conditions:**
1. **Price is below the Range Filter** → Indicates a downtrend.
2. **Downward trend strength is positive** (confirmed via trend counter).
3. **RSI is below the sell threshold** (e.g., 50, to confirm momentum).
4. **ADX confirms trend strength** (e.g., above 25).
5. **Volatility is supportive** (using ATR analysis).
#### **🚪 Exit Conditions:**
- **Stop Loss (SL):**
- **Long Trades:** 1 ATR below entry price.
- **Short Trades:** 1 ATR above entry price.
- **Take Profit (TP):**
- Set at **3x the risk distance** to achieve a favorable risk-reward ratio.
- **Ranging Market Exit:**
- If ADX falls below the threshold, indicating a weakening trend.
---
### **4. Visualization & Alerts**
- **Colored range filter line** changes based on trend direction.
- **Buy and Sell signals** appear as labels on the chart.
- **Stop Loss and Take Profit levels** are plotted as dashed lines.
- **Gray background highlights ranging markets** where trading is avoided.
- **Alerts trigger on Buy, Sell, and Ranging Market conditions** for automation.
---
### **5. Advantages of the Enhanced Range Filter Strategy**
✅ **Trend-Following with Noise Reduction** → Helps avoid false signals by filtering out weak trends.
✅ **Momentum Confirmation with RSI & ADX** → Ensures that only strong, valid trades are executed.
✅ **Volatility-Based Risk Management** → ATR ensures adaptive stop loss and take profit placements.
✅ **Works on Multiple Timeframes** → Effective for day trading, swing trading, and scalping.
✅ **Visually Intuitive** → Clearly displays trade signals, SL/TP levels, and trend conditions.
---
### **6. Who Should Use This Strategy?**
✔ **Trend Traders** who want to enter trades with momentum confirmation.
✔ **Swing Traders** looking for medium-term opportunities with a solid risk-reward ratio.
✔ **Scalpers** who need precise entries and exits to minimize false signals.
✔ **Algorithmic Traders** using alerts for automated execution.
---
### **7. Conclusion**
The **Enhanced Range Filter Strategy** is a powerful trading tool that combines **trend-following techniques, momentum indicators, and risk management** into a structured, rule-based system. By leveraging **Range Filters, RSI, ADX, and ATR**, traders can improve trade accuracy, manage risk effectively, and filter out unfavorable market conditions.
This strategy is **ideal for traders looking for a systematic, disciplined approach** to capturing trends while **avoiding market noise and false breakouts**. 🚀
Multi-TF Fibonacci Divergence StrategyChart Beast 3
The 1 hour and 4 hour time frame must be above the 200 Exponential Moving average for buy trades, and below the 200 Exponential Moving Average for sell trades.
Price on the previous day's daily candle must have closed above the candle before its body and wick for buys and below it for sells. (Example: Today is Monday and price has not yet closed, fridays daily candle closed above the thursday candles body and wick for buys and below it for sells)
Price on The 15 minute time frame must retrace past the 50% level on the fibonacci indicator. Price must not close beyond the 78.6% level on the fibonacci indicator. (on the 5 minute time frame, 15 minute time frame, 1 hour time frame, 4 hour time frame.)
Price on the 15 minute time frame must have retraced to the -27% or -61.8 levels on the fibonacci indicator. (Price must not close beyond the 78.6% fibonacci level on the hourly time frame)
Price on the 15 minute time frame or the 5 minute time frame must show bullish divergence once price has touched the -27% or -61.8% fibonacci level for buys and bearish divergence for sells.
Provide alerts when these conditions have been met. (ONLY in the session of the asset that's being traded)
Do not add lines to the chart, provide an option to turn on and off the past alerts that meet these conditions.
Make it visually appealing on the charts and easy to understand.
Transient Impact Model [ScorsoneEnterprises]This indicator is an implementation of the Transient Impact Model. This tool is designed to show the strength the current trades have on where price goes before they decay.
Here are links to more sophisticated research articles about Transient Impact Models than this post arxiv.org and arxiv.org
The way this tool is supposed to work in a simple way, is when impact is high price is sensitive to past volume, past trades being placed. When impact is low, it moves in a way that is more independent from past volume. In a more sophisticated system, perhaps transient impact should be calculated for each trade that is placed, not just the total volume of a past bar. I didn't do it to ensure parameters exist and aren’t na, as well as to have more iterations for optimization. Note that the value will change as volume does, as soon as a new candle occurs with no volume, the values could be dramatically different.
How it works
There are a few components to this script, so we’ll go into the equation and then the other functions used in this script.
// Transient Impact Model
transient_impact(params, price_change, lkb) =>
alpha = array.get(params, 0)
beta = array.get(params, 1)
lambda_ = array.get(params, 2)
instantaneous = alpha * volume
transient = 0.0
for t = 1 to lkb - 1
if na(volume )
break
transient := transient + beta * volume * math.exp(-lambda_ * t)
predicted_change = instantaneous + transient
math.pow(price_change - predicted_change, 2)
The parameters alpha, beta, and lambda all represent a different real thing.
Alpha (α):
Represents the instantaneous impact coefficient. It quantifies the immediate effect of the current volume on the price change. In the equation, instantaneous = alpha * volume , alpha scales the current bar's volume (volume ) to determine how much of the price change is due to immediate market impact. A larger alpha suggests that current volume has a stronger instantaneous influence on price.
Beta (β):
Represents the transient impact coefficient.It measures the lingering effect of past volumes on the current price change. In the loop calculating transient, beta * volume * math.exp(-lambda_ * t) shows that beta scales the volume from previous bars (volume ), contributing to a decaying effect over time. A higher beta indicates a stronger influence from past volumes, though this effect diminishes with time due to the exponential decay factor.
Lambda (λ):
Represents the decay rate of the transient impact.It controls how quickly the influence of past volumes fades over time in the transient component. In the term math.exp(-lambda_ * t), lambda determines the rate of exponential decay, where t is the time lag (in bars). A larger lambda means the impact of past volumes decays faster, while a smaller lambda implies a longer-lasting effect.
So in full.
The instantaneous term, alpha * volume , captures the immediate price impact from the current volume.
The transient term, sum of beta * volume * math.exp(-lambda_ * t) over the lookback period, models the cumulative, decaying effect of past volumes.
The total predicted_change combines these two components and is compared to the actual price change to compute an error term, math.pow(price_change - predicted_change, 2), which the script minimizes to optimize alpha, beta, and lambda.
Other parts of the script.
Objective function:
This is a wrapper function with a function to minimize so we get the best alpha, beta, and lambda values. In this case it is the Transient Impact Function, not something like a log-likelihood function, helps with efficiency for a high iteration count.
Finite Difference Gradient:
This function calculates the gradient of the objective function we spoke about. The gradient is like a directional derivative. Which is like the direction of the rate of change. Which is like the direction of the slope of a hill, we can go up or down a hill. It nudges around the parameter, and calculates the derivative of the parameter. The array of these nudged around parameters is what is returned after they are optimized.
Minimize:
This is the function that actually has the loop and calls the Finite Difference Gradient each time. Here is where the minimizing happens, how we go down the hill. If we are below a tolerance, we are at the bottom of the hill.
Applied
After an initial guess, we optimize the parameters and get the transient impact value. This number is huge, so we apply a log to it to make it more readable. From here we need some way to tell if the value is low or high. We shouldn’t use standard deviation because returns are not normally distributed, an IQR is similar and better for non normal data. We store past transient impact values in an array, so that way we can see the 25th and 90th percentiles of the data as a rolling value. If the current transient impact is above the 90th percentile, it is notably high. If below the 25th percentile, notably low. All of these values are plotted so we can use it as a tool.
Tool examples:
The idea around it is that when impact is low, there is room for big money to get size quickly and move prices around.
Here we see the price reacting in the IQR Bands. We see multiple examples where the value above the 90th percentile, the red line, corresponds to continuations in the trend, and below the 25th percentile, the purple line, corresponds to reversals. There is no guarantee these tools will be perfect, that is outlined in these situations, however there is clearly a correlation in this tool and trend.
This tool works on any timeframe, daily as we saw before, or lower like a two minute. The bands don’t represent a direction, like bullish or bearish, we need to determine that by interpreting price action. We see at open and at close there are the highest values for the transient impact. This is to be expected as these are the times with the highest volume of the trading day.
This works on futures as well as equities with the same context. Volume can be attributed to volatility as well. In volatile situations, more volatility comes in, and we can perceive it through the transient impact value.
Inputs
Users can enter the lookback value.
No tool is perfect, the transient impact value is also not perfect and should not be followed blindly. It is good to use any tool along with discretion and price action.
RSI Strategy with Backtestingupgraded RSI Strategy with strategy backtesting support included. It places trades when RSI crosses below the oversold level (Buy) and above the overbought level (Sell), and includes adjustable take-profit and stop-loss inputs for more realistic simulation.
Forex Majors - Stochastic Signals‘How will the price change and where will the market go next?’ - is a question that all traders and long-term investors are concerned about. Many spend years trying different trading approaches and only lose time and money. The author offers his own analytical method VPA, with the help of which you will be able to confidently predict the market direction, and your decisions to buy or sell will be based on logic and analysis of the price-volume relationship.
Translated with DeepL.com (free version)
JACK Pivot Breakout StrategyThis script is quite robust and includes comprehensive logic for pivot breakouts, EMA analysis, and support/resistance breaks.
Apply this script to TradingView or similar charting platforms to visualize pivot points, EMAs, and support/resistance lines.
Adjust the parameters (slPips, tpPips, etc.) to suit your trading style and risk tolerance.
Monitor the generated alerts for actionable trading opportunities.
Shan AlertsKey Features:
ATR-Based Trailing Stop:
Uses Average True Range (ATR) to determine stop distance
Adjustable multiplier (1.0 by default) for sensitivity
Configurable ATR period (10 by default)
Flexible Price Source:
Can use either regular candles or Heikin-Ashi candles
Toggle with the "Use Heikin-Ashi Candles" input
Visual Elements:
Plots the trailing stop line in orange
Shows BUY/SELL labels (configurable)
Colors bars green/red based on position
Trading Signals:
Generates BUY signals when price crosses above the trailing stop
Generates SELL signals when price crosses below the trailing stop
Includes alert conditions for both signals
Debug Information:
Shows current stop value and position on the last bar
ICT & SMC Multi-Timeframe by [KhedrFX]Transform your trading experience with the ICT & SMC Multi-Timeframe by indicator. This innovative tool is designed for traders who want to harness the power of multi-timeframe analysis, enabling them to make informed trading decisions based on key market insights. By integrating concepts from the Inner Circle Trader (ICT) and Smart Money Concepts (SMC), this indicator provides a comprehensive view of market dynamics, helping you identify potential trading opportunities with precision.
Key Features
- Multi-Timeframe Analysis: Effortlessly switch between various timeframes (5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, daily, and weekly) to capture the full spectrum of market movements.
- High and Low Levels: Automatically calculates and displays the highest and lowest price levels over the last 20 bars, highlighting critical support and resistance zones.
- Market Structure Visualization: Identifies the last swing high and swing low, allowing you to recognize current market trends and potential reversal points.
- Order Block Detection: Detects significant order blocks, pinpointing areas of strong buying or selling pressure that can indicate potential market reversals.
- Custom Alerts: Set alerts for when the price crosses above or below identified order block levels, enabling you to act swiftly on trading opportunities.
How to Use the Indicator
1. Add the Indicator to Your Chart
- Open TradingView.
- Click on the "Indicators" button at the top of the screen.
- Search for "ICT & SMC Multi-Timeframe by " in the search bar.
- Click on the indicator to add it to your chart.
2. Select Your Timeframe
- Use the dropdown menu to choose your preferred timeframe (5, 15, 30, 60, 240, D, W) for analysis.
3. Interpret the Signals
- High Level (Green Line): Represents the highest price level over the last 20 bars, acting as a potential resistance level.
- Low Level (Red Line): Represents the lowest price level over the last 20 bars, acting as a potential support level.
- Last Swing High (Blue Cross): Indicates the most recent significant high, useful for identifying potential reversal points.
- Last Swing Low (Orange Cross): Indicates the most recent significant low, providing insight into market structure.
- Order Block High (Purple Line): Marks the upper boundary of a detected order block, suggesting potential selling pressure.
- Order Block Low (Yellow Line): Marks the lower boundary of a detected order block, indicating potential buying pressure.
4. Set Alerts
- Utilize the alert conditions to receive notifications when the price crosses above or below the order block levels, allowing you to stay informed about potential trading opportunities.
5. Implement Risk Management
- Always use proper risk management techniques. Consider setting stop-loss orders based on the identified swing highs and lows or the order block levels to protect your capital.
Conclusion
The ICT & SMC Multi-Timeframe by indicator is an essential tool for traders looking to enhance their market analysis and decision-making process. By leveraging multi-timeframe insights, market structure visualization, and order block detection, you can navigate the complexities of the market with confidence. Start using this powerful indicator today and take your trading to the next level.
⚠️ Trade Responsibly
This tool helps you analyze the market, but it’s not a guarantee of profits. Always do your own research, manage risk, and trade with caution.
Highs/Lows des Sessions - Paris TimeThis indicator represents the different sessions (London, NY and Asia), at french hours, on the index market.
Highs/Lows des Sessions - Paris TimeThis indicator represents the different sessions of the indexes (S&P and NASDAQ), including Asian, London and New-York at french hour, Paris.
Sahid Strategy v2This script identifies potential buy/sell signals using:
Pivot Points - Detects swing highs/lows (price reversals)
Confirmation Filters - Reduces false signals using:
RSI (momentum)
Moving Average (trend direction)
Optional MACD (trend confirmation)
Key Features
Signal Type Trigger Conditions
BUY - Price makes a swing low (pivot)
Copy
- RSI ≤ 30 (oversold)
- Price above trend MA
- MACD bullish (optional) |
| SELL | - Price makes a swing high (pivot)
- RSI ≥ 70 (overbought)
- Price below trend MA
- MACD bearish (optional) |
Visual Signals
Green "BUY" labels below price bars
Red "SELL" labels above price bars
Purple trend line (20-period EMA/SMA)
Orange/blue circles showing raw pivot points
Optional Tools
Debug Table (top-right): Shows real-time:
RSI value
Price vs MA position
MACD status
Alerts - Triggers audible/visual notifications
Customization
Adjust in settings:
Pivot sensitivity (left/right bars)
RSI levels (30/70 by default)
MA type/length (20-period EMA/SMA)
Toggle MACD filter on/off
Best For: Swing trading in trending markets (1H-4H timeframes). Signals appear faster than classic pivot strategies but still require confirmation from other analysis tools.
TRIX Strategy)trix strategy with rsi
this is a winning strategy if used with good setting can get 140 pesent roi per year
this is true i have done that with this strategy jast play with the setting to get the best result
EMA Crossover 9/21 📈 **EMA Crossover Signal Line**
Created by **Ahmet AKSOY (tugeday)**
This indicator visualizes the crossover between two EMAs using a single dynamic-colored line.
✅ **How it works:**
- The script calculates two EMAs: a short-period EMA and a long-period EMA.
- Only the **short EMA line** is displayed on the chart.
- When the short EMA **crosses above** the long EMA (bullish crossover), the line color turns **green**.
- When the short EMA **crosses below** the long EMA (bearish crossover), the line color turns **red**.
- The line color remains based on the last crossover signal.
🎛️ **Customizable Inputs:**
- Short EMA period (default: 9)
- Long EMA period (default: 21)
All EMA periods can be adjusted from the settings panel, allowing traders to fine-tune the indicator to match their strategy.
Simple, clean, and effective.
Developed by **Ahmet AKSOY (tugeday)** — enjoy and trade smart!
BTC Trading RobotOverview
This Pine Script strategy is designed for trading Bitcoin (BTC) by placing pending orders (BuyStop and SellStop) based on local price extremes. The script also implements a trailing stop mechanism to protect profits once a position becomes sufficiently profitable.
________________________________________
Inputs and Parameter Setup
1. Trading Profile:
o The strategy is set up specifically for BTC trading.
o The systemType input is set to 1, which means the strategy will calculate trade parameters using the BTC-specific inputs.
2. Common Trading Inputs:
o Risk Parameters: Although RiskPercent is defined, its actual use (e.g., for position sizing) isn’t implemented in this version.
o Trading Hours Filter:
SHInput and EHInput let you restrict trading to a specific hour range. If these are set (non-zero), orders will only be placed during the allowed hours.
3. BTC-Specific Inputs:
o Take Profit (TP) and Stop Loss (SL) Percentages:
TPasPctBTC and SLasPctBTC are used to determine the TP and SL levels as a percentage of the current price.
o Trailing Stop Parameters:
TSLasPctofTPBTC and TSLTgrasPctofTPBTC determine when and by how much a trailing stop is applied, again as percentages of the TP.
4. Other Parameters:
o BarsN is used to define the window (number of bars) over which the local high and low are calculated.
o OrderDistPoints acts as a buffer to prevent the entry orders from being triggered too early.
________________________________________
Trade Parameter Calculation
• Price Reference:
o The strategy uses the current closing price as the reference for calculations.
• Calculation of TP and SL Levels:
o If the systemType is set to BTC (value 1), then:
Take Profit Points (Tppoints) are calculated by multiplying the current price by TPasPctBTC.
Stop Loss Points (Slpoints) are calculated similarly using SLasPctBTC.
A buffer (OrderDistPoints) is set to half of the take profit points.
Trailing Stop Levels:
TslPoints is calculated as a fraction of the TP (using TSLTgrasPctofTPBTC).
TslTriggerPoints is similarly determined, which sets the profit level at which the trailing stop will start to activate.
________________________________________
Time Filtering
• Session Control:
o The current hour is compared against SHInput (start hour) and EHInput (end hour).
o If the current time falls outside the allowed window, the script will not place any new orders.
________________________________________
Entry Orders
• Local Price Extremes:
o The strategy calculates a local high and local low using a window of BarsN * 2 + 1 bars.
• Placing Stop Orders:
o BuyStop Order:
A long entry is triggered if the current price is less than the local high minus the order distance buffer.
The BuyStop order is set to trigger at the level of the local high.
o SellStop Order:
A short entry is triggered if the current price is greater than the local low plus the order distance buffer.
The SellStop order is set to trigger at the level of the local low.
Note: Orders are only placed if there is no current open position and if the session conditions are met.
________________________________________
Trailing Stop Logic
Once a position is open, the strategy monitors profit levels to protect gains:
• For Long Positions:
o The script calculates the profit as the difference between the current price and the average entry price.
o If this profit exceeds the TslTriggerPoints threshold, a trailing stop is applied by placing an exit order.
o The stop price is set at a distance below the current price, while a limit (profit target) is also defined.
• For Short Positions:
o The profit is calculated as the difference between the average entry price and the current price.
o A similar trailing stop exit is applied if the profit exceeds the trigger threshold.
________________________________________
Summary
In essence, this strategy works by:
• Defining entry levels based on recent local highs and lows.
• Placing pending stop orders to enter the market when those levels are breached.
• Filtering orders by time, ensuring trades are only taken during specified hours.
• Implementing a trailing stop mechanism to secure profits once the trade moves favorably.
This approach is designed to automate BTC trading based on price action and dynamic risk management, although further enhancements (like dynamic position sizing based on RiskPercent) could be added for a more complete risk management system.
TREND and ZL FLOWThis PineScript combines two technical indicators—T3 Slow Trend Histogram and Zero Lag Moving Average to analyze market trends and potential reversals.
Giving credit to original authors of their original indicators: RedKTrader and Bjorgum
I have combined these into one indicator showing when trend is best to be trading...
When all lines are showing Green you are in a buying pressure market.
When all are lines are showing Red then you are in a selling pressure market.
T3 Slow Trend Histogram (Bjorgum):
A smoothed moving average (T3) is calculated using a recursive EMA (Exponential Moving Average) process with a length of 8 and a smoothing factor (b = 0.7). Six layers of EMAs are computed (xe1 to xe6) and combined with weighted coefficients (c1 to c4) to generate the final T3 value (nT3Average).
The histogram visually represents the T3’s momentum: green bars indicate upward momentum (T3 rising) and red bars signal downward momentum (T3 falling). This helps identify trend strength and direction.
ZL Flow (Zero-Lag Moving Average RedKTrader ):
A double-smoothed WMA (Weighted Moving Average) with a length of 9 and smoothing factor of 2 is applied to the price. The final ZLMA line is derived using a formula (2 * priceMA - ta.wma(priceMA, length)) to reduce lag.
The ZLMA line changes color (bright green for upward, red for downward) based on its direction.
Together, the T3 histogram tracks trend dynamics, while the ZL Flow provides early reversal signals, offering a dual approach to trend analysis and trade timing. The script is ideal for traders seeking confirmation of momentum shifts and zero-lag responsiveness.
5M Pro Toolkit Ultimate by dnnfafx🎯 Script Purpose
This script is a multi-indicator trading toolkit designed for use on the 5-minute chart (5M timeframe). It combines trend filters, momentum indicators, volume spikes, support/resistance levels, and candlestick pattern detection to assist in technical analysis and provide potential confluence signals for entries.
📌 Main Components
1. User Inputs
Allows users to customize key indicator settings:
EMA lengths (Short and Long)
RSI period
MACD parameters (fast, slow, signal)
Volume spike multiplier
Pivot left/right bar count
2. Trend Filter: EMA 50 and EMA 200
pine
Salin
Edit
emaShort = ta.ema(close, emaShortLen)
emaLong = ta.ema(close, emaLongLen)
Determines the trend direction.
EMA 50 (orange) and EMA 200 (blue) are plotted on the main chart.
3. RSI (Relative Strength Index)
pine
Salin
Edit
rsi = ta.rsi(close, rsiLen)
Measures price momentum.
Horizontal lines at 70 (Overbought) and 30 (Oversold) for quick reference.
4. MACD Histogram
pine
Salin
Edit
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdHist = macdLine - signalLine
Plots the MACD histogram as vertical bars.
Useful for identifying trend strength and potential reversals.
5. Volume Spike Detection
pine
Salin
Edit
volSpike = volume > volMA * volMultiplier
Detects significant volume surges compared to the 20-period volume average.
Displays a red triangle below the candle when a spike occurs.
6. Support & Resistance (Pivot High/Low)
pine
Salin
Edit
pivotHigh = ta.pivothigh(high, pivotLeft, pivotRight)
pivotLow = ta.pivotlow(low, pivotLeft, pivotRight)
Automatically detects local highs (resistance) and lows (support) using pivot logic.
Resistance lines in red, Support lines in green.
7. Candlestick Pattern Detection
Identifies four popular patterns:
Bullish Engulfing (green label "Engulf" below the bar)
Bearish Engulfing (red label "Engulf" above the bar)
Hammer (lime triangle)
Shooting Star (fuchsia triangle)
8. Confluence Entry Logic (Incomplete)
pine
Salin
Edit
buyCond = rsi
This section is currently incomplete.
It's likely intended to define a buy condition based on the confluence of RSI, MACD, EMA trend, volume spike, and candlestick patterns.
🧩 Conclusion
This toolkit is an all-in-one solution for intraday 5-minute trading, combining trend, momentum, volume, price action, and pattern recognition. While the entry logic (buyCond) is not yet finished, the structure is well laid out and can serve as the foundation for a manual or automated trading strategy.
BDD stochKDBDD 系統中所使用的 stochKD 指標,類似於 KD指標,主要用法為金死叉判斷於K值動能判斷。
BDD 系统中所使用的 stochKD 指标,类似于 KD指标,主要用法为金死叉判断于K值动能判断。
The stochKD indicator used in the BDD system is similar to the KD indicator. It is mainly used to judge the golden cross and K value kinetic energy.
SJ SuperTrend V2SJ Super Trend V2 (updated 2025 04 04)
“A strategy for entry and exit signals that compares the 5-minute and 15-minute timeframes.”
H1 Candle Reference + n Pips TargetThis indicator uses the H1 candle at a specified time (default 8:00) to set daily reference levels. It captures the high and low of the 8:00 H1 candle and displays them as blue horizontal lines across all timeframes for the rest of the day. Additionally, it plots two red target lines, set a fixed number of ticks above and below these reference levels.