Machine Learning Price Target Prediction Signals [AlgoAlpha]Introducing the Machine Learning Price Target Predictions, a cutting-edge trading tool that leverages kernel regression to provide accurate price targets and enhance your trading strategy. This indicator combines trend-based signals with advanced machine learning techniques, offering predictive insights into potential price movements. Perfect for traders looking to make data-driven decisions with confidence.
What is Kernel Regression and How It Works
Kernel regression is a non-parametric machine learning technique that estimates the relationship between variables by weighting data points based on their similarity to a given input. The similarity is determined using a kernel function, such as the Gaussian (RBF) kernel, which assigns higher weights to closer data points and progressively lower weights to farther ones. This allows the model to make smooth and adaptive predictions, balancing recent data and historical trends.
Key Features
🎯 Predictive Price Targets : Uses kernel regression to estimate the magnitude of price movements.
📈 Dynamic Trend Analysis : Multiple trend detection methods, including EMA crossovers, Hull Moving Average, and SuperTrend.
🔧 Customizable Settings : Adjust bandwidth for kernel regression and tweak trend indicator parameters to suit your strategy.
📊 Visual Trade Levels : Displays take-profit and stop-loss levels directly on the chart with customizable colors.
📋 Performance Metrics : Real-time win rate, recommended risk-reward ratio, and training data size displayed in an on-chart table.
🔔 Alerts : Get notified for new trends, take-profit hits, and stop-loss triggers.
How to Use
🛠 Add the Indicator : Add it to your favorites and apply it to your chart. Configure the trend detection method (SuperTrend, HMA, or EMA crossover) and other parameters based on your preferences.
📊 Analyze Predictions : Observe the predicted move size, recommended risk-reward ratio, and trend direction. Use the displayed levels for trade planning.
🔔 Set Alerts : Enable alerts for trend signals, take-profit hits, or stop-loss triggers to stay informed without constant monitoring.
How It Works
The indicator calculates features such as price volatility, relative strength, and trend signals, which are stored during training periods. When a trend change is detected, the kernel regression model predicts the likely price move based on these features. Predictions are smoothed using the specified bandwidth to avoid overfitting while ensuring timely responses to feature changes. Visualized take-profit and stop-loss levels help traders optimize risk management. Real-time metrics like win rate and recommended risk-reward ratios provide actionable insights for decision-making.
Penunjuk dan strategi
Trend Filter (2-pole) [BigBeluga]Trend Filter (2-pole)
The Trend Filter (2-pole) is an advanced trend-following indicator based on a two-pole filter, which smooths out market noise while effectively highlighting trends and their strength. It incorporates color gradients and support/resistance dots to enhance trend visualization and decision-making for traders.
SP500:
🔵What is a Two-Pole Filter?
A two-pole filter is a digital signal processing technique widely used in electronics, control systems, and time series data analysis to smooth data and reduce noise.
//@function Two-pole filter
//@param src (series float) Source data (e.g., price)
//@param length (float) Length of the filter (higher value means smoother output)
//@param damping (float) Damping factor for the filter
//@returns (series float) Filtered value
method two_pole_filter(float src, int length, float damping) =>
// Calculate filter coefficients
float omega = 2.0 * math.pi / length
float alpha = damping * omega
float beta = math.pow(omega, 2)
// Initialize the filter variables
var float f1 = na
var float f2 = na
// Update the filter
f1 := nz(f1 ) + alpha * (src - nz(f1 ))
f2 := nz(f2 ) + beta * (f1 - nz(f2 ))
f2
It operates using two cascaded smoothing stages (poles), allowing for a more refined and responsive output compared to simple moving averages or other basic filters.
Two-pole filters are particularly valued for their ability to maintain smooth transitions while reducing lag, making them ideal for applications where precision and responsiveness are critical.
In trading, this filter helps detect trends by smoothing price data while preserving significant directional changes.
🔵Key Features of the Indicator:
Gradient-Colored Trend Filter Line: The main filter line dynamically changes color based on trend strength and direction:
- Green: Strong uptrend.
- Red: Strong downtrend.
- Yellow: Indicates a transition phase, signaling potential trend shifts.
Support and Resistance Dots with Signals:
- Dots are plotted below the filter line during uptrends and above it during downtrends.
- These dots represent consecutive rising or falling conditions of the filter line, which traders can set in the settings (e.g., the number of consecutive rises or falls required).
- The dots often act as dynamic support or resistance levels, providing valuable guidance during trends.
- Trend Signals:
Customizable Sensitivity: The indicator allows traders to adjust the filter length, damping factor, and the threshold for rising/falling conditions, enabling it to adapt to different trading styles and timeframes.
Bar Color Option: The indicator can optionally color bars to match the gradient of the filter line, enhancing visual clarity of trends directly on the price chart.
🔵How It Works:
The Trend Filter (2-pole) smooths price data using a two-pole filter, which reduces noise and highlights the underlying trend.
The gradient coloring of the filter line helps traders visually assess the strength and direction of trends.
Rising and falling conditions of the filter line are tracked, and dots are plotted when consecutive conditions meet the threshold, acting as potential support or resistance levels during trends.
The yellow transition color signals periods of indecision, helping traders anticipate potential reversals or consolidations.
🔵Use Cases:
Identify and follow strong uptrends and downtrends with gradient-based visual cues.
Use the yellow transition color to anticipate trend shifts or consolidation zones.
Leverage the plotted dots as dynamic support and resistance levels to refine entry and exit strategies.
Combine with other indicators for confirmation of trends and reversals.
This indicator is perfect for traders who want a visually intuitive and highly customizable tool to spot trends, gauge their strength, and make informed trading decisions.
Red Pill VWAP/RSI DivergenceI created this indicator to identify moments in time VWAP and RSI are diverging.
Ideally useful in strong trend, bullish or bearish, as a potential entry point on a pull back for continuation. Not to be used as a stand alone signal, but rather in conjunction with any possible trend/momentum strategy.
VWAP is identified as the blue line. Green label(blue pill) is your potential entry on a pull back when price is above, stacked EMAS & VWAP for a long position. Red label(red pill) is your potential entry on a pull back when price is below inversely stacked EMAS & VWAP for a short position. These are the 2 ideal scenarios I have found. Please back test for yourself
I have had great results but must emphasis this is not a stand alone buy/sell. I use it in confluence to add conviction to my current A+ setups.
***Pivot ribbon in chart created by Saty Mahajan set to 3/10 time warp works ideal in conjunction.
***please note false positive and false negative signals can occur, particularly in chop
I hope you find this helpful . TRADE SAFE!
XAUUSD FAMILY STRATEGYThe stoploss and profit visuals sometimes are not visible because profits are being hit right away so no time to display the visuals.
- Inverse Fisher Transform on Stochastic
- Added Buy/Sell Signals based on retracement on defined levels
- Added TP and SL Visuals
- Added customizable settings
For
XAUUSD
on 15m Timeframe
Default setings are already in place
Adaptive Fourier Transform Supertrend [QuantAlgo]Discover a brand new way to analyze trend with Adaptive Fourier Transform Supertrend by QuantAlgo , an innovative technical indicator that combines the power of Fourier analysis with dynamic Supertrend methodology. In essence, it utilizes the frequency domain mathematics and the adaptive volatility control technique to transform complex wave patterns into clear and high probability signals—ideal for both sophisticated traders seeking mathematical precision and investors who appreciate robust trend confirmation!
🟢 Core Architecture
At its core, this indicator employs an adaptive Fourier Transform framework with dynamic volatility-controlled Supertrend bands. It utilizes multiple harmonic components that let you fine-tune how market frequencies influence trend detection. By combining wave analysis with adaptive volatility bands, the indicator creates a sophisticated yet clear framework for trend identification that dynamically adjusts to changing market conditions.
🟢 Technical Foundation
The indicator builds on three innovative components:
Fourier Wave Analysis: Decomposes price action into primary and harmonic components for precise trend detection
Adaptive Volatility Control: Dynamically adjusts Supertrend bands using combined ATR and standard deviation
Harmonic Integration: Merges multiple frequency components with decreasing weights for comprehensive trend analysis
🟢 Key Features & Signals
The Adaptive Fourier Transform Supertrend transforms complex wave calculations into clear visual signals with:
Dynamic trend bands that adapt to market volatility
Sophisticated cloud-fill visualization system
Strategic L/S markers at key trend reversals
Customizable bar coloring based on trend direction
Comprehensive alert system for trend shifts
🟢 Practical Usage Tips
Here's how you can get the most out of the Adaptive Fourier Transform Supertrend :
1/ Setup:
Add the indicator to your favorites, then apply it to your chart ⭐️
Start with close price as your base source
Use standard Fourier period (14) for balanced wave detection
Begin with default harmonic weight (0.5) for balanced sensitivity
Start with standard Supertrend multiplier (2.0) for reliable band width
2/ Signal Interpretation:
Monitor trend band crossovers for potential signals
Watch for convergence of price with Fourier trend
Use L/S markers for trade entry points
Monitor bar colors for trend confirmation
Configure alerts for significant trend reversals
🟢 Pro Tips
Fine-tune Fourier parameters for optimal sensitivity:
→ Lower Base Period (8-12) for more reactive analysis
→ Higher Base Period (15-30) to filter out noise
→ Adjust Harmonic Weight (0.3-0.7) to control shorter trend influence
Customize Supertrend settings:
→ Lower multiplier (1.5-2.0) for tighter bands
→ Higher multiplier (2.0-3.0) for wider bands
→ Adjust ATR length based on market volatility
Strategy Enhancement:
→ Compare signals across multiple timeframes
→ Combine with volume analysis
→ Use with support/resistance levels
→ Integrate with other momentum indicators
Best of Option Indicator - Manoj WadekarPlot this indicator for both CALL and PUT options and buy only when color of candle is YELLOW and above BLACK line.
Signals from Pawel Signals from Pawel is a trend-following indicator that generates buy and sell signals aligned with the prevailing trend, highlighting the principle: "Trend is your friend." Signals are triggered after a trend change is confirmed, using EMA crossovers (100 and 200 periods) as key indicators. When EMAs are widely separated, it indicates stronger trends with higher profit potential. Conversely, as EMAs converge, the trend weakens, increasing the likelihood of smaller gains or stop-loss triggers. For best results, prioritize signals shortly after a trend reversal, when EMA separation is more pronounced.
This indicator is optimized for the 5-minute timeframe on XAU/USD but may also be effective for other currency pairs and timeframes.
Jrols bullshitGamestop has had its fair share of grifters throughout the years, but none as blatant as JamesRoland
x.com
He's selling a "trigger indicator" taht is just fucking EMAs.
I thought I'd provide the community with a free version because fuck him that's why.
I'm sick and tired of bad actors taking advantage of people.
Its not fancy with bullshit fades like his, but i don't fucking care. Run it and get the same "signals" as his bullshit paid indicator provides.
How to Use the "Jrols Bullshit" Indicator in Pine Script
This script is a custom indicator for TradingView that plots three different Exponential Moving Averages (EMAs) on the chart, each calculated from different timeframes: Daily, Weekly, and Monthly. These EMAs help identify long-term trends on different time scales.
Key Features:
Daily 40 EMA (calculated using a daily timeframe)
Weekly 120 EMA (calculated using a weekly timeframe)
Monthly 575 EMA (approximated using 575 periods on the daily chart)
Each of these EMAs is plotted using a step line style, making it easy to see the level at which each EMA lies over time.
Cotuk Cumulative Volume IndicatorThis indicator is used for tracking cumulative volumes and useful for generating buy/sell signals
KJS-- Gost Pivot MAKJS Ghost Pivot Moving Average
This indicator calculates a "Ghost Pivot" by estimating where the monthly pivot level would be if the current candle's close represented the end of the month. The calculation uses:
• The current month's high and low from regular trading hours (RTH).
• The current candle's close, which includes both premarket and after-hours data.
It also smooths the ghost pivot using a customizable simple moving average (SMA).
Features:
• Plots the current month's high (blue) and low (yellow) based on RTH data.
• Calculates and plots a dynamic pivot (purple line) as the average of the monthly high, low, and current close (HLC3).
• Includes a customizable SMA length for smoother pivot tracking (default: 3).
This indicator helps traders anticipate potential monthly pivot levels in real-time while visualizing key support and resistance areas.
SCE Price Action SuiteThis is an indicator designed to use past market data to mark key price action levels as well as provide a different kind of insight. There are 8 different features in the script that users can turn on and off. This description will go in depth on all 8 with chart examples.
#1 Absorption Zones
I defined Absorption Zones as follows.
//----------------------------------------------
//---------------Absorption---------------------
//----------------------------------------------
box absorptionBox = na
absorptionBar = ta.highest(bodySize, absorptionLkb)
bsab = ta.barssince(bool(ta.change(absorptionBar)))
if bsab == 0 and upBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(0, 80, 75), border_width = boxLineSize, bgcolor = color.rgb(0, 80, 75))
absorptionBox
else if bsab == 0 and downBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = color.rgb(105, 15, 15))
absorptionBox
What this means is that absorption bars are defined as the bars with the largest bodies over a selected lookback period. Those large bodies represent areas where price may react. I was inspired by the concept of a Fair Value Gap for this concept. In that body price may enter to be a point of support or resistance, market participants get “absorbed” in the area so price can continue in whichever direction.
#2 Candle Wick Theory/Strategy
I defined Candle Wick Theory/Strategy as follows.
//----------------------------------------------
//---------------Candle Wick--------------------
//----------------------------------------------
highWick = upBar ? high - close : downBar ? high - open : na
lowWick = upBar ? open - low : downBar ? close - low : na
upWick = upBar ? close + highWick : downBar ? open + highWick : na
downWick = upBar ? open - lowWick : downBar ? close - lowWick : na
downDelivery = upBar and downBar and high > upWick and highWick > lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
upDelivery = downBar and upBar and low < downWick and highWick < lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
line lG = na
line lE = na
line lR = na
bodyMidpoint = math.abs(body) / 2
upWickMidpoint = math.abs(upWickSize) / 2
downWickkMidpoint = math.abs(downWickSize) / 2
if upDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, downWickkMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, downWickkMidpoint)
cpG = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 + tp))
cpR = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 - sl))
cpG1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 + tp))
cpR1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 - sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
else if downDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, upWickMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, upWickMidpoint)
cpG = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 - tp))
cpR = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 + sl))
cpG1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 - tp))
cpR1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 + sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
First I get the size of the wicks for the top and bottoms of the candles. This depends on if the bar is red or green. If the bar is green the wick is the high minus the close, if red the high minus the open, and so on. Next, the script defines the upper and lower bounds of the wicks for further comparison. If the candle is green, it's the open price minus the bottom wick. If the candle is red, it's the close price minus the bottom wick, and so on. Next we have the condition for when this strategy is present.
Down delivery:
Occurs when the previous candle is green, the current candle is red, and:
The high of the current candle is above the upper wick of the previous candle.
The size of the current candle's top wick is greater than its bottom wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed (barstate.isconfirmed).
The session is during market hours (session.ismarket).
Up delivery:
Occurs when the previous candle is red, the current candle is green, and:
The low of the current candle is below the lower wick of the previous candle.
The size of the current candle's bottom wick is greater than its top wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed.
The session is during market hours
Then risk is plotted from the percentage that users can input from an ideal entry spot.
#3 Candle Size Theory
I defined Candle Size Theory as follows.
//----------------------------------------------
//---------------Candle displacement------------
//----------------------------------------------
line lECD = na
notableDown = bodySize > bodySize * candle_size_sensitivity and downBar and session.ismarket and barstate.isconfirmed
notableUp = bodySize > bodySize * candle_size_sensitivity and upBar and session.ismarket and barstate.isconfirmed
if notableUp and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(0, 80, 75), line.style_solid, 3)
lECD
else if notableDown and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(105, 15, 15), line.style_solid, 3)
lECD
This plots candles that are “notable” or out of the ordinary. Candles that are larger than the last by a value users get to specify. These candles' highs or lows, if they are green or red, act as levels for support or resistance.
#4 Candle Structure Theory
I defined Candle Structure Theory as follows.
//----------------------------------------------
//---------------Structure----------------------
//----------------------------------------------
breakDownStructure = low < low and low < low and high > high and upBar and downBar and upBar and downBar and session.ismarket and barstate.isconfirmed
breakUpStructure = low > low and low > low and high < high and downBar and upBar and downBar and upBar and session.ismarket and barstate.isconfirmed
if breakUpStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.teal, line.style_solid, 3)
lE
else if breakDownStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, open)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, open)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.red, line.style_solid, 3)
lE
It is a series of candles to create a notable event. 2 lower lows in a row, a lower high, then green bar, red bar, green bar is a structure for a breakdown. 2 higher lows in a row, a higher high, red bar, green bar, red bar for a break up.
#5 Candle Swing Structure Theory
I defined Candle Swing Structure Theory as follows.
//----------------------------------------------
//---------------Swing Structure----------------
//----------------------------------------------
line htb = na
line ltb = na
if totalSize * swing_struct_sense < totalSize and upBar and downBar and high > high and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, high)
cpE = chart.point.new(time, bar_index + bl_strcuture, high)
htb := line.new(cpS, cpE, xloc.bar_index, color = color.red, style = line.style_dashed)
htb
else if totalSize * swing_struct_sense < totalSize and downBar and upBar and low > low and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, low)
cpE = chart.point.new(time, bar_index + bl_strcuture, low)
ltb := line.new(cpS, cpE, xloc.bar_index, color = color.teal, style = line.style_dashed)
ltb
A bearish swing structure is defined as the last candle’s total size, times a scalar that the user can input, is less than the current candles. Like a size imbalance. The last bar must be green and this one red. The last high should also be less than this high. For a bullish swing structure the same size imbalance must be present, but we need a red bar then a green bar, and the last low higher than the current low.
#6 Fractal Boxes
I define the Fractal Boxes as follows
//----------------------------------------------
//---------------Fractal Boxes------------------
//----------------------------------------------
box b = na
int indexx = na
if bar_index % (n * 2) == 0 and session.ismarket and showBoxes
b := box.new(left = bar_index, top = topBox, right = bar_index + n, bottom = bottomBox, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = na)
indexx := bar_index + 1
indexx
The idea of this strategy is that the market is fractal. It is considered impossible to be able to tell apart two different time frames from just the chart. So inside the chart there are many many breakouts and breakdowns happening as price bounces around. The boxes are there to give you the view from your timeframe if the market is in a range from a time frame that would be higher than it. Like if we are inside what a larger time frame candle’s range. If we break out or down from this, we might be able to trade it. Users can specify a lookback period and the box is that period’s, as an interval, high and low. I say as an interval because it is plotted every n * 2 bars. So we get a box, price moves, then a new box.
#7 Potential Move Width
I define the Potential Move Width as follows
//----------------------------------------------
//---------------Move width---------------------
//----------------------------------------------
velocity = V(n)
line lC = na
line l = na
line l2 = na
line l3 = na
line l4 = na
line l5 = na
line l6 = na
line l7 = na
line l8 = na
line lGFractal = na
line lRFractal = na
cp2 = chart.point.new(time, bar_index + n, close + velocity)
cp3 = chart.point.new(time, bar_index + n, close - velocity)
cp4 = chart.point.new(time, bar_index + n, close + velocity * 5)
cp5 = chart.point.new(time, bar_index + n, close - velocity * 5)
cp6 = chart.point.new(time, bar_index + n, close + velocity * 10)
cp7 = chart.point.new(time, bar_index + n, close - velocity * 10)
cp8 = chart.point.new(time, bar_index + n, close + velocity * 15)
cp9 = chart.point.new(time, bar_index + n, close - velocity * 15)
cpG = chart.point.new(time, bar_index + n, close + R)
cpR = chart.point.new(time, bar_index + n, close - R)
if ((bar_index + n) * 2 - bar_index) % n == 0 and session.ismarket and barstate.isconfirmed and showPredictionWidtn
cp = chart.point.new(time, bar_index, close)
cpG1 = chart.point.new(time, bar_index, close + R)
cpR1 = chart.point.new(time, bar_index, close - R)
l := line.new(cp, cp2, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l2 := line.new(cp, cp3, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l3 := line.new(cp, cp4, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l4 := line.new(cp, cp5, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l5 := line.new(cp, cp6, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l6 := line.new(cp, cp7, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l7 := line.new(cp, cp8, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8 := line.new(cp, cp9, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8
By using the past n bar’s velocity, or directional speed, every n * 2 bars. I can use it to scale the close value and get an estimate for how wide the next moves might be.
#8 Linear regression
//----------------------------------------------
//---------------Linear Regression--------------
//----------------------------------------------
lr = showLR ? ta.linreg(close, n, 0) : na
plot(lr, 'Linear Regression', color.blue)
I used TradingView’s built in linear regression to not reinvent the wheel. This is present to see past market strength of weakness from a different perspective.
User input
Users can control a lot about this script. For the strategy based plots you can enter what you want the risk to be in percentages. So the default 0.01 is 1%. You can also control how far forward the line goes.
Look back at where it is needed as well as line width for the Fractal Boxes are controllable. Also users can check on and off what they would like to see on the charts.
No indicator is 100% reliable, do not follow this one blindly. I encourage traders to make their own decisions and not trade solely based on technical indicators. I encourage constructive criticism in the comments below. Thank you.
[blackat] L2 Bull and Bear Heaven LineOVERVIEW
The L2 Bull and Bear Heaven Line script is a custom indicator designed to visualize trend directions using Exponential Moving Average (EMA)-based lines and generate trade signals based on crossovers between those lines. It also incorporates an RSI-like feature to provide additional insight into overbought and oversold conditions.
FEATURES
Utilizes two EMAs: a longer-term "Heaven Line" (default 60 bars) and a shorter-term "Trading Line" (default 30 bars).
Generates buy/sell signals based on crossovers between the "Trading Line" and "Heaven Line".
Identifies potential turning points in the market, indicating shifts from bullish to bearish or vice versa.
Includes an "Operation Line" similar to RSI, aiding in detecting overbought/oversold levels.
HOW TO USE
Add the script to your TradingView chart.
Observe the crossovers between the "Trading Line" and "Heaven Line":
Buy signal when the "Trading Line" crosses above the "Heaven Line".
Sell signal when the "Trading Line" crosses below the "Heaven Line".
Monitor the "Operation Line" for additional confirmation:
Secondary sell signal when the "Operation Line" drops below 90% and there is downward price action.
Complementary buy signal when the "Operation Line" rises above 10% and there is upward price action.
Consider the identified trend direction and potential turning points to make informed trading decisions.
LIMITATIONS
The effectiveness of the signals depends on the chosen time frame and specific market conditions.
False signals may occur due to volatile price movements or rapid changes in market sentiment.
NOTES
This script combines traditional technical analysis tools like EMAs with an RSI-like approach to enhance decision-making processes. Users should backtest the strategy under various market scenarios before implementing it in live trading.
THANKS
Special thanks to the contributors whose work inspired parts of this script.
MEMEQUANTMEMEQUANT
This script is a comprehensive and specialized tool designed for tracking trends and money flow within meme coins and DEX tokens. By combining various features such as trend lines, Fibonacci levels, and category-based indices, it helps traders make informed decisions in highly volatile markets.
Key Features:
1. Category-Based Indices:
• Tracks the performance of token categories like:
• AI Agent Tokens
• AI Tokens
• Animal Tokens
• Murad Picks
• Each category consists of leader tokens, which are selected based on their higher market cap and trading volume. These tokens act as benchmarks for their respective categories.
• Visualizes category indices in a line chart to identify trends and compare money flow between categories.
2. Fibonacci Correction Zones:
• Highlights key retracement levels (e.g., 60%, 70%, 80%).
• These levels are crucial for identifying potential reversal zones, commonly observed in meme coin trading patterns.
• Fully customizable to match individual trading strategies.
3. Trend Lines:
• Automatically detects major support and resistance levels.
• Separates long-term and short-term trend lines, allowing traders to focus on significant price movements.
4. Enhanced Info Table:
• Provides real-time insights, including:
• % Distance from All-Time High (ATH)
• Current Trading Volume
• 50-bar Average Volume
• Volume Change Percentage
• Displays information in an easy-to-read table on the chart.
5. Customizable Settings:
• Users can adjust transparency, colors, and ranges for Fibonacci zones, trend lines, and the table.
• Enables or disables individual features (e.g., Fibonacci, trend lines, table) based on preferences.
How It Works:
1. Tracking Money Flow Across Categories:
• The script calculates the market cap to volume ratio for each category of tokens to help identify the dominant trend.
• A higher ratio indicates greater liquidity and stability, while a lower ratio suggests higher volatility or price manipulation.
2. Identifying Retracement Patterns:
• Leverages common retracement behaviors (e.g., 70% correction levels) observed in meme coins to detect potential reversal zones.
• Combines this with trend line analysis for additional confirmation.
3. Leader Tokens as Indicators:
• Each category is represented by its leader tokens, which have historically higher liquidity and market cap. This allows the script to accurately reflect the overall trend in each category.
When to Use:
• Trend Analysis: To identify which category (e.g., AI Tokens or Animal Tokens) is leading the market.
• Reversal Zones: To spot potential support or resistance levels using Fibonacci zones.
• Money Flow: To understand how capital is moving across different token categories in real time.
Who Is This For?
This script is tailored for:
• Traders specializing in meme coins and DEX tokens.
• Those looking for an edge in trend-based trading by analyzing market cap, volume, and retracement levels.
• Anyone aiming to track money flow dynamics between different token categories.
Future Updates:
This is the initial version of the script. Future updates may include:
• Support for additional token categories and DEX data.
• More advanced pattern recognition and alerts for volume and price anomalies.
• Enhanced visualization for historical data trends.
With this tool, traders can combine money flow analysis with the 60-70% retracement strategy, turning it into a powerful assistant for navigating the fast-paced world of meme coins and DEX tokens.
This script is designed to provide meaningful insights and practical utility for traders, adhering to TradingView’s standards for originality, clarity, and user value.
Dynamic S/R Levels: Edge FinderOverview
The Dynamic S/R Levels: Edge Finder indicator is designed to identify dynamic support and resistance levels based on historical price action. It uses a combination of price extremes (highs and lows) over user-defined lookback periods, weighted moving averages (WMAs), and touch-count analysis to provide actionable insights into key market levels.
This tool is ideal for traders who want to:
Identify dynamic support and resistance zones.
Understand the strength of these levels based on price touches.
Make informed decisions using clear, adaptive levels.
How It Works
Dynamic Levels Calculation:
The indicator calculates dynamic support levels using the lowest lows and dynamic resistance levels using the highest highs over user-defined lookback periods (e.g., 20, 40, 60 bars, etc.).
These levels are updated dynamically as new price data becomes available.
Touch Count Analysis:
The indicator counts how many times the price has touched or come close to each support/resistance level within the lookback period.
Levels with more touches are considered stronger and are highlighted accordingly.
Weighted Moving Averages (WMAs):
The indicator uses 50-period and 100-period WMAs to identify the closest support/resistance levels to the current trend.
Levels near these WMAs are given additional weight, as they are more likely to act as significant barriers.
Level Merging:
If two support or resistance levels are too close to each other (based on the minimum distance percentage), the weaker level (with fewer touches) is removed to avoid clutter.
Visualization:
Support levels are displayed as dashed red lines, and resistance levels are displayed as dashed blue lines.
Each level is labeled with its corresponding touch count, allowing traders to quickly assess its strength.
How to Interpret the Indicator
Strong Support/Resistance Levels:
Levels with higher touch counts (e.g., 5, 10, or more) are considered stronger and are more likely to hold in the future.
Use these levels to plan entries, exits, or stop-loss placements.
Proximity to WMAs:
Levels closest to the 50-period or 100-period WMA are more significant, especially in trending markets.
These levels often act as dynamic barriers where price reactions are more likely.
Breakouts and Rejections:
If the price breaks through a strong resistance level, it may indicate a potential bullish trend.
If the price rejects a strong support level, it may indicate a potential bearish trend.
Always confirm breakouts or rejections with additional analysis (e.g., volume, candlestick patterns).
Level Merging:
Merged levels indicate areas of high confluence, where multiple support/resistance zones overlap.
These areas are particularly important for decision-making, as they represent stronger market reactions.
Key Features
Customizable Lookback Periods: Adjust the lookback periods for each dynamic level to suit your trading style.
Touch Count Labels: Quickly identify the strength of each level based on the number of price touches.
Adaptive Levels: The indicator dynamically updates levels based on recent price action.
Clean Visualization: Levels are automatically merged to avoid clutter and provide a clear view of the market structure.
Usage Tips
Trend Identification: Combine the indicator with trend-following tools (e.g., moving averages, trendlines) to confirm the overall market direction.
Risk Management: Use the identified levels to set stop-loss orders or take-profit targets.
Timeframe Flexibility: The indicator works on all timeframes, but it is particularly effective on higher timeframes (e.g., 1H, 4H, Daily) for more reliable levels.
Example Scenarios
Bounce Trade:
If the price approaches a strong support level (high touch count) and shows signs of rejection (e.g., bullish candlestick patterns), consider a long position with a stop-loss below the support level.
Breakout Trade:
If the price breaks above a strong resistance level with high volume, consider a long position with a target at the next resistance level.
Range-Bound Market:
In a sideways market, use the support and resistance levels to identify range boundaries and trade bounces between them.
Disclaimer
Dynamic S/R Levels: Edge Finder is a technical analysis tool designed to identify dynamic support and resistance levels based on historical price action. It is intended for informational and educational purposes only. This indicator does not provide financial, investment, or trading advice. Users are solely responsible for their trading decisions and should conduct their own research and analysis before making any trades. The developer of this tool is not liable for any financial losses or damages resulting from the use of this indicator. Trading in financial markets involves risk, and you should only trade with capital you can afford to lose.
Buy/Sell StrategyElliott wave analysis is designed to simplify and increase the objectivity of graph analysis using the Elliott wave method. this indicator can be successfully used in trading without knowing the Elliott wave method.
The indicator is based on wave counting
ICT Dealing RangeICT Dealing Range
This indicator identifies and plots ICT (Inner Circle Trader) Dealing Ranges - key institutional areas where smart money accumulates or distributes positions before significant moves.
What is a Dealing Range?
A Dealing Range is a significant price area where institutional traders accumulate or distribute their positions. These ranges form through a specific sequence of price movements that indicate institutional order flow:
Bullish Dealing Range Sequence:
1. Initial High (H)
2. Initial Low (L)
3. Higher High (HH)
4. Lower Low (LL)
5. Break above HH (confirmation)
Bearish Dealing Range Sequence:
1. Initial Low (L)
2. Initial High (H)
3. Lower Low (LL)
4. Higher High (HH)
5. Break below LL (confirmation)
My Trading Strategy
Entry Methods:
1. Range Extreme Retests:
- After range formation, wait for price to return to either extreme
- Long entries at range bottom with stops below
- Short entries at range top with stops above
2. Mid-Line Strategy:
- Use the mid-line as a pivot point for reversals
- Long entries on mid-line bounce with stops below
- Short entries on mid-line rejection with stops above
Stop Loss Placement:
- When entering at extremes: Place stops beyond the mid
- When entering at mid-line: Place stops beyond the opposing extreme
- Always respect the structure's boundaries
Take Profit Targets:
- Minimum 2:1 Risk-Reward ratio
- For extreme entries: Target the opposite extreme
- For mid-line entries: Target the nearest extreme
Risk Management
- Never enter without a clear invalidation point
- Maintain minimum 2:1 RR ratio
- Consider market structure and higher timeframe context
Indicator Features
- Auto-detection of dealing range patterns
- Color-coded boxes (green for bullish, red for bearish)
- Optional mid-line display
- Customizable colors and styles
- Adjustable pivot lookback periods
Notes
This tool is based on ICT concepts but should be used in conjunction with other forms of analysis. The dealing range provides a framework for understanding institutional order flow, but proper risk management and market context are essential for successful trading.
Remember: The best trades often come from clean retests of these ranges after their initial formation. Patience in waiting for proper setups is key to successful implementation.
Candle 1 2 3 on XAUUSD (by Veronica)Description
Discover the Candle 1 2 3 Strategy, a simple yet effective trading method tailored exclusively for XAUUSD on the 15-minute timeframe. Designed by Veronica, this strategy focuses on identifying key reversal and continuation patterns during the London and New York sessions, making it ideal for traders who prioritise high-probability entries during these active market hours.
Key Features:
1. Session-Specific Trading:
The strategy operates strictly during London (03:00–06:00 UTC) and New York (08:30–12:30 UTC) sessions, where XAUUSD tends to show higher volatility and clearer price movements.
Pattern Criteria:
- Works best if the first candle is NOT a pin bar or a doji.
- Third candle should either:
a. Be a marubozu (large body with minimal wicks).
a. Have a significant body with wicks, ensuring the close of the third candle is above Candle 2 (for Buy) or below Candle 2 (for Sell).
Callout Labels and Alerts:
Automatic Buy and Sell labels are displayed on the chart during qualifying sessions, ensuring clarity for decision-making.
Integrated alerts notify you of trading opportunities in real-time.
Risk Management:
Built-in Risk Calculator to estimate lot sizes based on your account size, risk percentage, and stop-loss levels.
Customizable Table:
Displays your calculated lot size for various stop-loss pip values, making risk management seamless and efficient.
How to Use:
1. Apply the indicator to XAUUSD (M15).
2. Focus on setups appearing within the London and New York sessions only.
3. Ensure the first candle is neither a pin bar nor a doji.
4. Validate the third candle's body placement:
For a Buy, the third candle’s close must be above the second candle.
For a Sell, the third candle’s close must be below the second candle.
5. Use the generated alerts to streamline your entry process.
Notes:
This strategy is meant to complement your existing knowledge of market structure and price action.
Always backtest thoroughly and adjust parameters to fit your personal trading style and risk tolerance.
Credit:
This strategy is the intellectual property of Veronica, developed specifically for XAUUSD (M15) traders seeking precision entries during high-volume sessions.
pejman//FUNCTIONS
RoundUp(number, decimals) =>
factor = math.pow(10, decimals)
math.ceil(number * factor) / factor
calc_rr(float entry_price, float sl_price, float take_price) =>
entry_price > sl_price ? (take_price - entry_price) / (entry_price - sl_price) : (entry_price - take_price) / (sl_price - entry_price)
create_trend_line(float sensitivity, float fib) =>
high_line = ta.highest(high, int(sensitivity))
low_line = ta.lowest(low, int(sensitivity))
channel_range = high_line - low_line
high_line - channel_range * fib
//FUNCTIONS
// TYPES AND METHODS
type Strategy_settings
float sensitivity = 0
float risk_percent = 1
string break_even_target = "1"
float tp1_percent = 0
float tp1_percent_fix = 0
float tp2_percent = 0
float tp2_percent_fix = 0
float tp3_percent = 0
float tp3_percent_fix = 0
float tp4_percent = 0
float tp4_percent_fix = 0
bool fixed_stop = false
float sl_percent = 0
type Trade
int start_bar_index = 0
string side
float market_order_comission
float limit_order_comission
float entry_price
bool entry_hit = false
float sl_price
float tp1_price
float tp1_percent_fix
float tp2_price
float tp2_percent_fix
float tp3_price
float tp3_percent_fix
float tp4_price
float tp4_percent_fix
float break_even_price
bool sl_hit = false
bool tp1_hit = false
bool tp2_hit = false
bool tp3_hit = false
bool tp4_hit = false
float position_size_left = 100
float risk_percent
bool is_closed = false
float close_price = 0
bool can_break_even = false
bool force_closed = false
float profit = 0
float risk_reward
line entry_line
line stoploss_line
line target1_line
line target2_line
line target3_line
line target4_line
method calc_profit(Trade trade, bool show_labels) =>
label trade_info_label = na
label entry_hit_label = na
label tp1_hit_label = na
label tp2_hit_label = na
label tp3_hit_label = na
label tp4_hit_label = na
label sl_hit_label = na
label be_hit_label = na
float profit = 0.0
if trade.side == "LONG"
if low <= trade.entry_price and not trade.entry_hit
trade.start_bar_index := bar_index
trade.entry_hit := true
entry_hit_label := label.new(trade.start_bar_index, trade.entry_price, str.tostring("ENTRY HIT"), style = label.style_label_right)
trade_info_label := label.new(bar_index, high, "Trade info:" + " Entry: " + str.tostring(trade.entry_price) + " Tp1: " + str.tostring(trade.tp1_price) + " Tp2: " + str.tostring(trade.tp2_price) + " Tp3:" + str.tostring(trade.tp3_price) + " Tp4: " + str.tostring(trade.tp4_price) + " Sl: " + str.tostring(trade.sl_price))
if high >= trade.tp1_price and not trade.tp1_hit and trade.entry_hit
trade.tp1_hit := true
trade.position_size_left -= trade.tp1_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp1_price) * trade.tp1_percent_fix / 100 * trade.risk_percent
tp1_hit_label := label.new(trade.start_bar_index, trade.tp1_price, str.tostring("TP1 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if high >= trade.tp2_price and not trade.tp2_hit and trade.entry_hit
trade.tp2_hit := true
trade.can_break_even := true
trade.position_size_left -= trade.tp2_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp2_price) * trade.tp2_percent_fix / 100 * trade.risk_percent
tp2_hit_label := label.new(trade.start_bar_index, trade.tp2_price, str.tostring("TP2 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if high >= trade.tp3_price and not trade.tp3_hit and trade.entry_hit
trade.tp3_hit := true
trade.position_size_left -= trade.tp3_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp3_price) * trade.tp3_percent_fix / 100 * trade.risk_percent
tp3_hit_label := label.new(trade.start_bar_index, trade.tp3_price, str.tostring("TP3 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if high >= trade.tp4_price and not trade.tp4_hit and trade.entry_hit
trade.tp4_hit := true
trade.is_closed := true
trade.position_size_left -= trade.tp4_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp4_price) * trade.tp4_percent_fix / 100 * trade.risk_percent
tp4_hit_label := label.new(trade.start_bar_index, trade.tp4_price, str.tostring("TP4 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if high >= trade.break_even_price and not trade.can_break_even and trade.entry_hit
trade.can_break_even := true
//BE ENTRY HIT
if trade.can_break_even and trade.entry_hit
if low <= trade.entry_price and not (close >= open) and bar_index != trade.start_bar_index
trade.is_closed := true
be_hit_label := label.new(bar_index, trade.entry_price, str.tostring("BE HIT"), style = label.style_label_left)
// SL HIT
if low <= trade.sl_price and not trade.can_break_even and trade.entry_hit and bar_index != trade.start_bar_index
trade.sl_hit := true
trade.is_closed := true
profit += -trade.risk_percent * trade.position_size_left / 100
sl_hit_label := label.new(bar_index, trade.sl_price, str.tostring("SL HIT ") + str.tostring(profit, "#.##") + "%", color = color.red, style = label.style_label_left)
else
if high >= trade.entry_price and not trade.entry_hit
trade.start_bar_index := bar_index
trade.entry_hit := true
entry_hit_label := label.new(trade.start_bar_index, trade.entry_price, str.tostring("ENTRY HIT"), style = label.style_label_right)
trade_info_label := label.new(bar_index, high, "Trade info:" + " Entry: " + str.tostring(trade.entry_price) + " Tp1: " + str.tostring(trade.tp1_price) + " Tp2: " + str.tostring(trade.tp2_price) + " Tp3:" + str.tostring(trade.tp3_price) + " Tp4: " + str.tostring(trade.tp4_price) + " Sl: " + str.tostring(trade.sl_price))
if low <= trade.tp1_price and not trade.tp1_hit and trade.entry_hit
trade.tp1_hit := true
trade.position_size_left -= trade.tp1_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp1_price) * trade.tp1_percent_fix / 100 * trade.risk_percent
tp1_hit_label := label.new(trade.start_bar_index, trade.tp1_price, str.tostring("TP1 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if low <= trade.tp2_price and not trade.tp2_hit and trade.entry_hit
trade.tp2_hit := true
trade.position_size_left -= trade.tp2_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp2_price) * trade.tp2_percent_fix / 100 * trade.risk_percent
tp2_hit_label := label.new(trade.start_bar_index, trade.tp2_price, str.tostring("TP2 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if low <= trade.tp3_price and not trade.tp3_hit and trade.entry_hit
trade.tp3_hit := true
trade.position_size_left -= trade.tp3_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp3_price) * trade.tp3_percent_fix / 100 * trade.risk_percent
tp3_hit_label := label.new(trade.start_bar_index, trade.tp3_price, str.tostring("TP3 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if low <= trade.tp4_price and not trade.tp4_hit and trade.entry_hit
trade.tp4_hit := true
trade.is_closed := true
trade.position_size_left -= trade.tp4_percent_fix
profit += calc_rr(trade.entry_price, trade.sl_price, trade.tp4_price) * trade.tp4_percent_fix / 100 * trade.risk_percent
tp4_hit_label := label.new(trade.start_bar_index, trade.tp4_price, str.tostring("TP4 HIT +") + str.tostring(profit, "#.##") + "%" + " Position size %: " + str.tostring(trade.position_size_left), style = label.style_label_right)
if low <= trade.break_even_price and not trade.can_break_even and trade.entry_hit
trade.can_break_even := true
//BE ENTRY HIT
if trade.can_break_even and trade.entry_hit
if high >= trade.entry_price and not (close <= open) and bar_index != trade.start_bar_index
trade.is_closed := true
be_hit_label := label.new(bar_index, trade.entry_price, str.tostring("BE HIT"), style = label.style_label_left)
// SL HIT
if high >= trade.sl_price and not trade.can_break_even and trade.entry_hit and bar_index != trade.start_bar_index
trade.sl_hit := true
trade.is_closed := true
profit += -trade.risk_percent * trade.position_size_left / 100
sl_hit_label := label.new(bar_index, trade.sl_price, str.tostring("SL HIT ") + str.tostring(profit, "#.##") + "%", color = color.red, style = label.style_label_left)
trade.profit += profit
if not show_labels
label.delete(entry_hit_label)
label.delete(tp1_hit_label)
label.delete(tp2_hit_label)
label.delete(tp3_hit_label)
label.delete(tp4_hit_label)
label.delete(sl_hit_label)
label.delete(be_hit_label)
label.delete(trade_info_label)
method close_trade(Trade trade, bool show_labels) =>
float profit = 0.0
label trade_closed_label = na
trade.force_closed := true
if not trade.sl_hit
if trade.side == "SHORT"
trade.is_closed := true
trade.close_price := close
if close <= trade.entry_price
percent_from_entry_to_close_price_at_trend_change = math.abs((close / trade.entry_price) * 100)
percent_from_entry_to_sl_price = math.abs((trade.entry_price / trade.sl_price) * 100)
profit := calc_rr(trade.entry_price, trade.sl_price, close) * trade.position_size_left / 100 * trade.risk_percent
else
profit := calc_rr(trade.entry_price, trade.sl_price, close) * trade.position_size_left / 100 * trade.risk_percent
string sign = profit >= 0 ? "+" : na
trade_closed_label := label.new(bar_index, high, str.tostring("TRADE CLOSED ") + sign + str.tostring(profit, "#.##") + "%")
else
trade.is_closed := true
trade.close_price := close
if close <= trade.entry_price
percent_from_entry_to_close_price_at_trend_change = math.abs((close / trade.entry_price - 1) * 100)
percent_from_entry_to_sl_price = math.abs((trade.entry_price / trade.sl_price - 1) * 100)
profit := -trade.risk_percent * (percent_from_entry_to_close_price_at_trend_change / percent_from_entry_to_sl_price) * trade.position_size_left / 100 + trade.profit
else
profit := calc_rr(trade.entry_price, trade.sl_price, close) * trade.position_size_left / 100 * trade.risk_percent
string sign = profit >= 0 ? "+" : na
trade_closed_label := label.new(bar_index, low, str.tostring("TRADE CLOSED ") + sign + str.tostring(profit, "#.##") + "%", style = label.style_label_up)
if not show_labels
label.delete(trade_closed_label)
trade.profit += profit
// TYPES AND METHODS
// STRATS
selector(string strategy_name) =>
strategy_settings = Strategy_settings.new()
switch strategy_name
"MANUAL" =>
strategy_settings.sensitivity := 18
strategy_settings.risk_percent := 1
strategy_settings.break_even_target := "1"
strategy_settings.tp1_percent := 1
strategy_settings.tp1_percent_fix := 40
strategy_settings.tp2_percent := 2
strategy_settings.tp2_percent_fix := 30
strategy_settings.tp3_percent := 3
strategy_settings.tp3_percent_fix := 20
strategy_settings.tp4_percent := 4
strategy_settings.tp4_percent_fix := 10
strategy_settings.fixed_stop := false
strategy_settings.sl_percent := 0.0
"UNIVERSAL 15m" =>
strategy_settings.sensitivity := 20
strategy_settings.risk_percent := 1
strategy_settings.break_even_target := "1"
strategy_settings.tp1_percent := 1
strategy_settings.tp1_percent_fix := 40
strategy_settings.tp2_percent := 2
strategy_settings.tp2_percent_fix := 30
strategy_settings.tp3_percent := 3
strategy_settings.tp3_percent_fix := 20
strategy_settings.tp4_percent := 4
strategy_settings.tp4_percent_fix := 10
strategy_settings.fixed_stop := false
strategy_settings.sl_percent := 0.0
"SOL 5m" =>
strategy_settings.sensitivity := 20
strategy_settings.risk_percent := 1
strategy_settings.break_even_target := "1"
strategy_settings.tp1_percent := 1
strategy_settings.tp1_percent_fix := 40
strategy_settings.tp2_percent := 2
strategy_settings.tp2_percent_fix := 30
strategy_settings.tp3_percent := 3
strategy_settings.tp3_percent_fix := 20
strategy_settings.tp4_percent := 4
strategy_settings.tp4_percent_fix := 10
strategy_settings.fixed_stop := false
strategy_settings.sl_percent := 0.0
strategy_settings
// STRATS
string STRATEGIES = "STRATEGIES"
string POSITION = "POSITION"
string ENTRY = "ENTRY"
string TAKE_PROFITS = "TAKE PROFITS"
string STOP_LOSS = "STOPLOSS"
string rsi_group = "RSI"
string main_group = "MAIN"
string info_panel_group = "INFOPANELS"
string dev_settings = "DEVELOPER MODE"
int fibo_lines_transparend = 60
int fill_best_transparend = 95
int fill_worst_transparend = 98
color high_line_color = color.rgb(36, 255, 44, fibo_lines_transparend)
color fib_236_color = color.rgb(130, 228, 74, fibo_lines_transparend)
color fib_382_color = color.rgb(171, 224, 174, fibo_lines_transparend)
color fib_618_color = color.rgb(235, 255, 51, fibo_lines_transparend)
color fib_786_color = color.rgb(255, 131, 73, fibo_lines_transparend)
color low_line_color = color.rgb(255, 82, 82, fibo_lines_transparend)
color high_best_fill_color = color.rgb(48, 255, 55, fill_best_transparend)
color high_worst_fill_color = color.rgb(37, 255, 44, fill_worst_transparend)
color low_best_fill_color = color.rgb(255, 54, 54, fill_best_transparend)
color low_worst_fill_color = color.rgb(255, 43, 43, fill_worst_transparend)
tp_sl_entry_transparent = 30
color tp_color = color.new(color.green, tp_sl_entry_transparent)
color entry_color = color.rgb(120, 123, 134, tp_sl_entry_transparent)
color sl_color = color.new(color.red, tp_sl_entry_transparent)
line_style = line.style_dotted
//@version=5
indicator(title='pejman', shorttitle='pejman', overlay=true, max_lines_count = 500, max_labels_count = 500, max_bars_back = 1)
//---------------------------------------------------SETTINGS----------------------------------------------------------\\
// STRATS
var float sensitivity = 18
float risk_percent = 1
string break_even_target = "2"
float tp1_percent = 0
float tp1_percent_fix = 0
float tp2_percent = 0
float tp2_percent_fix = 0
float tp3_percent = 0
float tp3_percent_fix = 0
float tp4_percent = 0
float tp4_percent_fix = 0
bool fixed_stop = false
float sl_percent = 0
strategy_input = input.string(title = "STRATEGY", options = , defval = "MANUAL", tooltip = "EN: To manually configure the strategy, select MANUAL otherwise, changing the settings won't have any effect RU: Чтобы настроить стратегию вручную, выберите MANUAL в противном случае изменение настроек не будет иметь никакого эффекта")
// MAIN
sensitivity_input = input.float(title = 'Sensitive', step = 0.1, defval = 18)
start_date_input = input.time(defval = timestamp("1 June 2023"), title = "Start calculating date")
// POSITION
show_tp_enty_sl = input.bool(defval = true, title = "Show", group = POSITION, inline = "2.1")
fill_positions = input.bool(defval = true, title = "Fill", group = POSITION, inline = "2.1")
risk_percent_input = input.float(title = "Risk %", step = 1, defval = 1, group = POSITION, tooltip = "EN: Maximum allowable loss % of the deposit per 1 trade RU: Максимально допустимая потеря % от депозита на 1 сделку")
break_even_target_input = input.string(title = "BE target", options = , defval = "1", group = POSITION)
initial_deposit_input = input.float(title = "Initial deposit", defval = 1000, step = 100, group = POSITION)
// STOPLOSS
fixed_stop_input = input.bool(defval = false, title = "Fixed stoploss %", group = STOP_LOSS, tooltip = "EN: If choosed: stoploss will be calculated manually If NOT choosed: stoploss will be calculated automatic RU: Если выбрано: стоп будет рассчитываться вручную Если НЕ выбрано: стоп будет рассчитываться автоматически")
sl_percent_input = input.float(title="SL %", step = 0.1, defval=0.00, group = STOP_LOSS)
// TAKE PROFITS
tp1_percent_input = input.float(title="TP 1", step = 0.05, defval=1.00, minval = 0, group = TAKE_PROFITS, inline = "2.2")
tp1_percent_fix_input = input.float(title = "Fix %", step = 5, defval=40, group = TAKE_PROFITS, inline = "2.2")
tp2_percent_input = input.float(title="TP 2", step = 0.05, defval=2.00, minval = 0, group = TAKE_PROFITS, inline = "2.3")
tp2_percent_fix_input = input.float(title = "Fix %", step = 5, defval=30, group = TAKE_PROFITS, inline = "2.3")
tp3_percent_input = input.float(title="TP 3", step = 0.05, defval=3.00, minval = 0, group = TAKE_PROFITS, inline = "2.4")
tp3_percent_fix_input = input.float(title = "Fix %", step = 5, defval=20, group = TAKE_PROFITS, inline = "2.4")
tp4_percent_input = input.float(title="TP 4", step = 0.05, defval=4.00, minval = 0, group = TAKE_PROFITS, inline = "2.5")
tp4_percent_fix_input = input.float(title = "Fix %", step = 5, defval=10, group = TAKE_PROFITS, inline = "2.5")
// RSI
show_rsi = input.bool(defval = false, title = "Show", group = rsi_group, inline = "3.1")
len = input(title="Length", defval=14, group = rsi_group, inline = "3.2")
overbought = input(title="Overbought", defval=78, group = rsi_group, inline = "3.3")
oversold = input(title="Oversold", defval=22, group = rsi_group, inline = "3.3")
// INFO PANEL
show_profit_panel = input.bool(defval = true, title = "Show profit panel", group = info_panel_group)
show_strategy_panel = input.bool(defval = false, title = "Show strategy panel", group = info_panel_group)
show_old_panel = input.bool(defval = false, title = "Show old panel", group = info_panel_group)
// DEV
show_dev_labels = input.bool(defval = false, title = "Show", group = dev_settings, tooltip = "Shows all possible events")
//-----------------------------------------------GLOBAL VARIABLES------------------------------------------------------\\
var float total_profit = 0.0
var int trade_count = 0
var int profit_trades = 0
var int loss_trades = 0
var int loss_streak = 0
var int loss_in_a_row = 0
var int win_streak = 0
var int wins_in_a_row = 0
var int first_trade_date = na
var Trade trade = na
var bool is_long_trend_started = false
var bool is_short_trend_started = false
var bool is_trend_change = na
var bool is_long_trend = false
var bool is_short_trend = false
var bool can_long = false
var bool can_short = false
var int trend_started_bar_index = na
var line tp1_line = na
var label tp1_label = na
var line tp2_line = na
var label tp2_label = na
var line tp3_line = na
var label tp3_label = na
var line tp4_line = na
var label tp4_label = na
var line entry_line = na
var label entry_label = na
var line close_line = na
var line sl_line = na
var label sl_label = na
var label lable_at_signal = na
var int signal_closed_bar = na
var Strategy_settings strategy_s = na
var float dep = initial_deposit_input
//-----------------------------------------------------MAIN------------------------------------------------------------\\
// STRATEGY
strategy_s := strategy_input == "MANUAL" ? Strategy_settings.new(sensitivity_input, risk_percent_input, break_even_target_input, tp1_percent_input, tp1_percent_fix_input, tp2_percent_input, tp2_percent_fix_input, tp3_percent_input, tp3_percent_fix_input, tp4_percent_input, tp4_percent_fix_input, fixed_stop_input, sl_percent_input) : selector(strategy_input)
sensitivity := strategy_s.sensitivity
risk_percent := strategy_s.risk_percent
break_even_target := strategy_s.break_even_target
tp1_percent := strategy_s.tp1_percent
tp1_percent_fix := strategy_s.tp1_percent_fix
tp2_percent := strategy_s.tp2_percent
tp2_percent_fix := strategy_s.tp2_percent_fix
tp3_percent := strategy_s.tp3_percent
tp3_percent_fix := strategy_s.tp3_percent_fix
tp4_percent := strategy_s.tp4_percent
tp4_percent_fix := strategy_s.tp4_percent_fix
fixed_stop := strategy_s.fixed_stop
sl_percent := strategy_s.sl_percent
sensitivity *= 10
tp1_percent /= 100
tp2_percent /= 100
tp3_percent /= 100
tp4_percent /= 100
tp1_percent_fix /= 100
tp2_percent_fix /= 100
tp3_percent_fix /= 100
tp4_percent_fix /= 100
sl_percent /= 100
high_line = ta.highest(high, int(sensitivity))
low_line = ta.lowest(low, int(sensitivity))
channel_range = high_line - low_line
fib_236 = high_line - channel_range * (0.236)
fib_382 = high_line - channel_range * 0.382
fib_5 = high_line - channel_range * 0.5
fib_618 = high_line - channel_range * 0.618
fib_786 = high_line - channel_range * (0.786)
imba_trend_line = fib_5
// CAN LONG/SHORT
if time >= start_date_input
can_long := close >= imba_trend_line and close >= fib_236 and not is_long_trend
can_short := close <= imba_trend_line and close <= fib_786 and not is_short_trend
if can_long
is_long_trend := true
is_short_trend := false
is_long_trend_started := is_long_trend_started ? false : true
else if can_short
is_short_trend := true
is_long_trend := false
is_short_trend_started := is_short_trend_started ? false : true
else
is_trend_change := false
can_long := false
can_short := false
is_short_trend_started := false
is_long_trend_started := false
is_trend_change := is_short_trend_started or is_long_trend_started
plotshape(is_long_trend and is_long_trend_started ? imba_trend_line : na, title="Long", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(is_short_trend and is_short_trend_started ? imba_trend_line : na, title="Short", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
plot(imba_trend_line, color = is_long_trend ? color.green : color.red, linewidth = 3)
// LOGIC
if not na(trade)
calc_profit(trade, show_dev_labels)
if is_trend_change and not trade.is_closed
close_trade(trade, show_dev_labels)
if not trade.is_closed
label.set_x(entry_label, bar_index - 3)
label.set_text(entry_label, str.tostring(trade.side == "LONG" ? "🔰" : "🔰") + str.tostring(trade.entry_price))
label.set_x(sl_label, bar_index - 3)
label.set_text(sl_label, "⛔" + str.tostring(trade.sl_price))
label.set_x(tp1_label, bar_index - 3)
label.set_text(tp1_label, str.tostring(trade.tp1_hit ? "✅" : "1️⃣") + str.tostring(trade.tp1_price))
label.set_x(tp2_label, bar_index - 3)
label.set_text(tp2_label, str.tostring(trade.tp2_hit ? "✅" : "2️⃣") + str.tostring(trade.tp2_price))
label.set_x(tp3_label, bar_index - 3)
label.set_text(tp3_label, str.tostring(trade.tp3_hit ? "✅" : "3️⃣") + str.tostring(trade.tp3_price))
label.set_x(tp4_label, bar_index - 3)
label.set_text(tp4_label, str.tostring(trade.tp4_hit ? "✅" : "4️⃣") + str.tostring(trade.tp4_price))
line.set_xy1(tp1_line, trade.start_bar_index, trade.tp1_price)
line.set_xy2(tp1_line, bar_index + 1, trade.tp1_price)
line.set_xy1(tp2_line, trade.start_bar_index, trade.tp2_price)
line.set_xy2(tp2_line, bar_index + 1, trade.tp2_price)
line.set_xy1(tp3_line, trade.start_bar_index, trade.tp3_price)
line.set_xy2(tp3_line, bar_index + 1, trade.tp3_price)
line.set_xy1(tp4_line, trade.start_bar_index, trade.tp4_price)
line.set_xy2(tp4_line, bar_index + 1, trade.tp4_price)
line.set_xy1(entry_line, trade.start_bar_index, trade.entry_price)
line.set_xy2(entry_line, bar_index + 1, trade.entry_price)
line.set_xy1(sl_line, trade.start_bar_index, trade.sl_price)
line.set_xy2(sl_line, bar_index + 1, trade.sl_price)
lable_at_signal.set_x(int(math.avg(bar_index, trade.start_bar_index)))
sign = trade.profit >= 0 ? "+" : na
lable_at_signal.set_text(sign + str.tostring(trade.profit, "#.##") + "%")
lable_at_signal.set_color(trade.profit >= 0 ? color.green : color.red)
// FILLING
if fill_positions
if trade.tp1_hit
linefill.new(entry_line, tp1_line, color = color.new(color.green, 85))
if trade.tp2_hit
linefill.new(tp1_line, tp2_line, color = color.new(color.green, 85))
if trade.tp3_hit
linefill.new(tp2_line, tp3_line, color = color.new(color.green, 85))
if trade.tp4_hit
linefill.new(tp3_line, tp4_line, color = color.new(color.green, 85))
if trade.sl_hit
linefill.new(sl_line, entry_line, color = color.new(color.red, 85))
if trade.force_closed
close_line := line.new(x1=trade.start_bar_index, y1=trade.close_price, x2=bar_index, y2=trade.close_price, color=color.white, style = line_style, width = 2)
if trade.profit <= 0
linefill.new(close_line, entry_line, color = color.new(color.red, 85))
if trade.is_closed
dep := (trade.profit / 100 * dep) + dep
label.delete(entry_label)
label.delete(sl_label)
label.delete(tp1_label)
label.delete(tp2_label)
label.delete(tp3_label)
label.delete(tp4_label)
total_profit += trade.profit
trade_count += 1
if trade.profit >= 0
profit_trades += 1
wins_in_a_row += 1
loss_in_a_row := 0
win_streak := wins_in_a_row > win_streak ? wins_in_a_row : win_streak
else
loss_trades += 1
loss_in_a_row += 1
wins_in_a_row := 0
loss_streak := loss_in_a_row > loss_streak ? loss_in_a_row : loss_streak
trade := na
alertcondition(can_long and na(trade), "Long signal", "Long")
alertcondition(can_short and na(trade), "Short signal", "Short")
alertcondition(can_short or can_long and na(trade), "New signal", "Check chart to see signal direction")
if can_long or can_short and na(trade)
first_trade_date := trade_count == 0 ? timestamp(year, month, dayofmonth, hour, minute) : first_trade_date
trade := Trade.new()
trade.side := can_long ? "LONG" : "SHORT"
trade.entry_price := close
trade.entry_hit := true
trade.sl_price := math.round_to_mintick(can_long ? fixed_stop ? trade.entry_price * (1 - sl_percent) : fib_786 * (1 - sl_percent) : fixed_stop ? trade.entry_price * (1 + sl_percent) : fib_236 * (1 + sl_percent))
trade.tp1_price := math.round_to_mintick(can_long ? trade.entry_price * (1 + tp1_percent) : trade.entry_price * (1 - tp1_percent))
trade.tp1_percent_fix := tp1_percent_fix * 100
trade.tp2_price := math.round_to_mintick(can_long ? trade.entry_price * (1 + tp2_percent) : trade.entry_price * (1 - tp2_percent))
trade.tp2_percent_fix := tp2_percent_fix * 100
trade.tp3_price := math.round_to_mintick(can_long ? trade.entry_price * (1 + tp3_percent) : trade.entry_price * (1 - tp3_percent))
trade.tp3_percent_fix := tp3_percent_fix * 100
trade.tp4_price := math.round_to_mintick(can_long ? trade.entry_price * (1 + tp4_percent) : trade.entry_price * (1 - tp4_percent))
trade.tp4_percent_fix := tp4_percent_fix * 100
trade.break_even_price := switch break_even_target
"1" => trade.tp1_price
"2" => trade.tp2_price
"3" => trade.tp3_price
"WITHOUT" => trade.tp4_price
trade.risk_percent := risk_percent
trade.risk_reward := calc_rr(trade.entry_price, trade.sl_price, trade.tp4_price)
trade.start_bar_index := bar_index
alert_message = " { " + " \"side\": \"" + str.tostring(trade.side) + "\", \"entry\": \"" + str.tostring(trade.entry_price) + "\", \"tp1\": \"" + str.tostring(trade.tp1_price) + "\", \"tp2\": \"" + str.tostring(trade.tp2_price) + "\", \"tp3\": \"" + str.tostring(trade.tp3_price) + "\", \"tp4\": \"" + str.tostring(trade.tp4_price) + "\", \"winrate\": \"" + str.tostring(RoundUp(profit_trades / trade_count * 100, 2)) + "%" + "\", \"strategy\": \"" + strategy_input + "\", \"beTargetTrigger\": \"" + break_even_target + "\", \"stop\": \"" + str.tostring(trade.sl_price) + "\" } "
alert(alert_message, alert.freq_once_per_bar_close)
if show_tp_enty_sl
entry_line := line.new(x1=trade.start_bar_index, y1=trade.entry_price, x2=bar_index, y2=trade.entry_price, color=entry_color, style = line.style_solid, width = 2)
entry_label := label.new(bar_index, trade.entry_price, str.tostring(trade.entry_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.gray)
sl_line := line.new(x1=trade.start_bar_index, y1=trade.sl_price, x2=bar_index, y2=trade.sl_price, color=sl_color, style = line_style, width = 2)
sl_label := label.new(bar_index, trade.sl_price, str.tostring(trade.sl_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.red)
tp1_line := line.new(x1=trade.start_bar_index, y1=trade.tp1_price, x2=bar_index, y2=trade.tp1_price, color=tp_color, style = line_style, width = 2)
tp1_label := label.new(bar_index, trade.tp1_price, str.tostring(trade.tp1_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.green)
tp2_line := line.new(x1=trade.start_bar_index, y1=trade.tp2_price, x2=bar_index, y2=trade.tp2_price, color=tp_color, style = line_style, width = 2)
tp2_label := label.new(bar_index, trade.tp2_price, str.tostring(trade.tp2_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.green)
tp3_line := line.new(x1=trade.start_bar_index, y1=trade.tp3_price, x2=bar_index, y2=trade.tp3_price, color=tp_color, style = line_style, width = 2)
tp3_label := label.new(bar_index, trade.tp3_price, str.tostring(trade.tp3_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.green)
tp4_line := line.new(x1=trade.start_bar_index, y1=trade.tp4_price, x2=bar_index, y2=trade.tp4_price, color=tp_color, style = line_style, width = 2)
tp4_label := label.new(bar_index, trade.tp4_price, str.tostring(trade.tp4_price), style = label.style_label_left, color = color.rgb(255, 255, 255, 100), textcolor = color.green)
lable_at_signal := label.new(bar_index, is_long_trend ? trade.tp4_price * 1.004 : trade.tp4_price * 0.996, "", style = label.style_label_center, textcolor = color.white)
//------------------------------------------------------RSI------------------------------------------------------------\\
rsi_value = ta.rsi(close, len)
is_overbought = rsi_value >= overbought
is_oversold = rsi_value <= oversold
plotshape(is_overbought and show_rsi ? high : na, color=color.red, style=shape.cross, size=size.tiny, location=location.abovebar)
plotshape(is_oversold and show_rsi ? low : na, color=color.green, style=shape.cross, size=size.tiny, location=location.belowbar)
//-----------------------------------------------------PANELS------------------------------------------------------------\\
lim = "-------------------------------------------------------"
high_idk = "╔════════════════════════════╗"
low_idk = "╚════════════════════════════╝"
panel_str1 = high_idk + " " + "pejman" + " " + low_idk
panel_str13 = "First signal: " + str.format("{0,date,hh:mm} {0,date,long}", first_trade_date) + " " + lim
panel_str14 = "Signal closed: " + str.tostring(trade_count) + " " + "Winrate: " + str.tostring(RoundUp(profit_trades / trade_count * 100, 2)) + "%"
panel_str15 = "Profit signals: " + str.tostring(profit_trades) + " " + "Loss signals: " + str.tostring(trade_count - profit_trades)
panel_str16 = "Win streak: " + str.tostring(win_streak) + " " + "Loss streak: " + str.tostring(loss_streak) + " " + lim
panel_str17 = "💰 Profit: " + str.tostring(total_profit, "#.##") + "% 💰"
panel_last = "╚════════════════════════════╝"
panel_str_arr = array.from(panel_str1, panel_str13, panel_str14, panel_str15, panel_str16, panel_str17, panel_last)
if show_old_panel
label l = label.new(bar_index + 20, close, text=array.join(panel_str_arr, " "), color=color.rgb(0, 0, 0, 87), style=label.style_label_left, textcolor=color.rgb(76, 187, 72),textalign=text.align_center)
label.delete(l )
var table profit_table = na
if show_profit_panel
profit_table := table.new(position.top_right, 3, 10, border_color = color.green, border_width = 0)
table.cell(profit_table, 0, 0, "═════════════════════════════" + " " + "pejman" + " " + "═════════════════════════════", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 5, text_size = size.normal)
table.cell(profit_table, 1, 0, "", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal)
table.merge_cells(profit_table, 0,0,1,0)
table.cell(profit_table, 0, 1, "First trade:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 8, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 1, str.format("{0,date,long}", first_trade_date), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 8, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 2, "Total trades:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 2, str.tostring(trade_count), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 3, "Profit trades:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 3, str.tostring(profit_trades), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 4, "Loss trades:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 4, str.tostring(loss_trades), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 5, "Winrate:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 5, str.tostring(RoundUp(profit_trades / trade_count * 100, 2)) + "%", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 6, "Win streak:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 6, str.tostring(win_streak), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 7, "Loss streak:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 7, str.tostring(loss_streak), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 8, "Deposit: ", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(profit_table, 1, 8, str.tostring(dep, "##.##"), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(profit_table, 0, 9, "═════════════════════════════" + " " + "💰 Profit: " + str.tostring(total_profit, "#.##") + "% 💰" + " " + "═════════════════════════════", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 10, text_size = size.normal, text_halign = text.align_center, text_valign = text.align_top)
table.cell(profit_table, 1, 9,"", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.merge_cells(profit_table, 0, 9, 1, 9)
var table strategy_table = na
if show_strategy_panel
strategy_table := table.new(position.bottom_right, 5, 6, border_color = color.green)
table.cell(strategy_table, 1, 0, "══════════════════════════════════════════" + " " + syminfo.ticker + " " + timeframe.period + " | WR: " + str.tostring(profit_trades / (profit_trades + (trade_count - profit_trades)) * 100, "##,##") + "%" + " | TT: " + str.tostring(trade_count) + " | P: " + str.tostring(total_profit, "#.##") + "%" + " " + "══════════════════════════════════════════", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 7, text_size = size.normal, text_valign = text.align_bottom)
table.cell(strategy_table, 2, 0, "", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 0, "", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 0, "", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal)
table.merge_cells(strategy_table, 1,0,4,0)
table.cell(strategy_table, 1, 1, "Strategy:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(strategy_table, 2, 1, strategy_input, bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 6, height = 3, text_size = size.normal)
table.cell(strategy_table, 1, 2, "Sensitivity:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(strategy_table, 2, 2, str.tostring(sensitivity / 10), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 1, 3, "Risk:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(strategy_table, 2, 3, str.tostring(risk_percent) + "%", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 1, 4, "BE target:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(strategy_table, 2, 4, str.tostring(break_even_target), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 1, 5, "Fixed stop:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal, text_halign = text.align_left)
table.cell(strategy_table, 2, 5, str.tostring(fixed_stop), bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 1, "TP1:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 4, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 1, str.tostring(tp1_percent * 100) + "%" + " (" + str.tostring(tp1_percent_fix * 100) + "%)", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 2, "TP2:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 4, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 2, str.tostring(tp2_percent * 100) + "%" + " (" + str.tostring(tp2_percent_fix * 100) + "%)", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 3, "TP3:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 4, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 3, str.tostring(tp3_percent * 100) + "%" + " (" + str.tostring(tp3_percent_fix * 100) + "%)", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 4, "TP4:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 4, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 4, str.tostring(tp4_percent * 100) + "%" + " (" + str.tostring(tp4_percent_fix * 100) + "%)", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 5, height = 3, text_size = size.normal)
table.cell(strategy_table, 3, 5, "Stop:", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 4, height = 3, text_size = size.normal)
table.cell(strategy_table, 4, 5, str.tostring(sl_percent * 100) + "%", bgcolor = color.rgb(0, 0, 0, 87), text_color = color.green, width = 8, height = 3, text_size = size.normal)
Market Structure CHoCH/BOS (Fractal) [vandji]Explication de la stratégie Market Structure CHoCH/BOS (Fractal)
Introduction
La stratégie Market Structure CHoCH/BOS (Fractal) est conçue pour analyser les structures de marché en identifiant les changements de caractère (Change of Character - CHoCH) et les cassures de structure (Break of Structure - BOS) basées sur des fractales. Cette approche permet aux traders de repérer les renversements de tendance ainsi que la continuation de celle-ci à l'aide d'un outil visuel intuitif et de niveaux clés marqués directement sur le graphique.
Fonctionnement de l'indicateur
L'indicateur utilise des fractales pour identifier des points hauts et bas significatifs dans le marché. Ces points permettent de :
Identifier les structures haussières (Bullish) :
Une cassure d'un sommet fractal indique une continuation ou un renversement haussier.
Des niveaux de support sont tracés pour repérer les zones où le prix peut rebondir.
Identifier les structures baissières (Bearish) :
Une cassure d'un bas fractal signale une continuation ou un renversement baissier.
Des niveaux de résistance sont tracés pour surveiller les zones où le prix peut se retourner.
L'indicateur utilise également des labels visuels tels que CHoCH et BOS :
CHoCH (Change of Character) : Indique un changement de tendance.
BOS (Break of Structure) : Confirme la continuation de la tendance.
Visualisation des Niveaux Clés
Support : Tracé lorsque la structure haussière est identifiée.
Résistance : Tracée lorsque la structure baissière est détectée. Ces niveaux servent de repères pour placer des ordres ou évaluer la force de la tendance.
Avantages
Identification claire des tendances : Les CHoCH et BOS aident à distinguer les renversements des continuations.
Zones clés définies : Les supports et résistances fractals donnent des points d'entrée ou de sortie potentiels.
Convient aux styles variés de trading : Applicable pour le scalping, le day trading ou le swing trading.
Exemple Visuel
Graphique annoté
L'image suivante illustre le fonctionnement de l'indicateur sur un graphique.
Les sommets fractals haussiers et baissiers sont marqués.
Les niveaux de support et de résistance sont dessinés.
Les labels CHoCH et BOS indiquent des points importants de renversement ou de continuation.
Trader Club 5in1Söz konusu bilgi, açıklanacak sözcükten daha uzun olur. Açıklama ile, ilgili durumun kanıtı şu şekilde doğrulanabilir: Bir sözlükteki tanım, ilgili sözcük yerine kullanılabilirse, bu bir açıklamadır. Yani aynı bağlam içinde hem sözcük hem de tanım kullanılırsa ve anlamsal açıdan bir sorun oluşturmuyorsa bu bir açıklamadır.
Fusion Signal ProFusion Signal Pro
Your All-in-One Trading Powerhouse
Say goodbye to cluttered charts and hello to precision trading. Fusion Signal Pro is the ultimate tool for traders who want to simplify their strategy without sacrificing accuracy. By combining the power of RSI, Parabolic SAR, MACD, Stochastic Oscillator, and EMAs, this indicator delivers crystal-clear signals and actionable insights—all in one sleek package.
What’s Under the Hood?
Fusion Signal Pro integrates 5 powerhouse indicators into a single, easy-to-use tool:
Relative Strength Index (RSI)
Spot overbought and oversold conditions like a pro.
Get buy signals when RSI crosses above the oversold zone and sell signals when it drops below overbought.
Parabolic SAR
Track trends and reversals with precision.
Visualized directly on your chart for seamless trend analysis.
MACD (Moving Average Convergence Divergence)
Master momentum and trend strength.
Buy/Sell signals trigger on crossovers between the MACD line and signal line.
Stochastic Oscillator
Gauge momentum and overbought/oversold levels.
Toggle this feature on or off to keep your chart clean and focused.
Exponential Moving Averages (EMAs)
Short and long EMAs for trend confirmation.
Use crossover signals for long-term strategies or trend-following setups.
Why Fusion Signal Pro?
Customizable AF: Tweak every setting to match your trading style—whether you’re a scalper, swing trader, or long-term investor.
Clean & Focused: Enable or disable components to declutter your chart and focus on what matters.
Flexible Display: Plot RSI, MACD, and Stochastic in a separate pane or keep them off the chart entirely.
Pro-Level Precision: Designed to work seamlessly with Heikin-Ashi candles for smoother trends and sharper signals.
Pro Tips for Maximum Gains
Pair with Heikin-Ashi: For next-level trend clarity, use Fusion Signal Pro with Heikin-Ashi candles. They smooth out price action, making it easier to spot reversals and ride trends.
Adjust for Timeframes: Shorter settings for scalping, longer settings for swing trading.
Tweak for Volatility: Fine-tune overbought/oversold levels and EMA lengths to match market conditions.
Key Settings Explained
RSI Settings
Length: Shorter = more sensitive; Longer = smoother.
Overbought/Oversold Levels: Lower thresholds = earlier signals (but more noise).
Parabolic SAR Settings
Start, Increment, Maximum: Control sensitivity. Smaller values = less reactive; larger values = more responsive to trends.
MACD Settings
Fast/Slow Lengths: Shorter = faster signals (scalping); Longer = smoother signals (swing trading).
Signal Length: Higher values = less noise but delayed signals.
Stochastic Settings
K & D Lengths: Shorter = faster signals; Longer = smoother signals.
Overbought/Oversold Levels: Adjust for volatile markets.
EMA Settings
Short/Long Lengths: Short EMAs = quick reactions; Long EMAs = trend confirmation.
Disclaimer
Fusion Signal Pro is a powerful tool, but it’s not a crystal ball. Always combine it with solid risk management, additional analysis, and your trading instincts. Trade smart, stay sharp, and let Fusion Signal Pro guide your way.
my all in one INDICATORTake on the role of one Daimyo, the clan leader, and use military engagements, economics and diplomacy to achieve the ultimate goal: re-unite Japan under his supreme command and become the new Shogun – the undisputed ruler of a pacified nation.
ZigZag++DDzigzag trading
Please note the original one is dedicated to developers, The code is very minimal for fast understanding when anyone wants to use it in their development
In this script, I have included several features like multi-timeframe and alerts. Do take a look and enjoy