Point and Figure (PnF) ChartThis is live and non-repainting Point and Figure Charting tool. The tool has it’s own P&F engine and not using integrated function of Trading View.
Point and Figure method is over 150 years old. It consist of columns that represent filtered price movements. Time is not a factor on P&F chart but as you can see with this script P&F chart created on time chart.
P&F chart provide several advantages, some of them are filtering insignificant price movements and noise, focusing on important price movements and making support/resistance levels much easier to identify.
If you are new to Point & Figure Chart then you better get some information about it before using this tool. There are very good web sites and books. Please PM me if you need help about resources.
Options in the Script
Box size is one of the most important part of Point and Figure Charting. Chart price movement sensitivity is determined by the Point and Figure scale. Large box sizes see little movement across a specific price region, small box sizes see greater price movement on P&F chart. There are four different box scaling with this tool: Traditional, Percentage, Dynamic (ATR), or User-Defined
4 different methods for Box size can be used in this tool.
User Defined: The box size is set by user. A larger box size will result in more filtered price movements and fewer reversals. A smaller box size will result in less filtered price movements and more reversals.
ATR: Box size is dynamically calculated by using ATR, default period is 20.
Percentage: uses box sizes that are a fixed percentage of the stock's price. If percentage is 1 and stock’s price is $100 then box size will be $1
Traditional: uses a predefined table of price ranges to determine what the box size should be.
Price Range Box Size
Under 0.25 0.0625
0.25 to 1.00 0.125
1.00 to 5.00 0.25
5.00 to 20.00 0.50
20.00 to 100 1.0
100 to 200 2.0
200 to 500 4.0
500 to 1000 5.0
1000 to 25000 50.0
25000 and up 500.0
Default value is “ATR”, you may use one of these scaling method that suits your trading strategy.
If ATR or Percentage is chosen then there is rounding algorithm according to mintick value of the security. For example if mintick value is 0.001 and box size (ATR/Percentage) is 0.00124 then box size becomes 0.001.
And also while using dynamic box size (ATR or Percentage), box size changes only when closing price changed.
Reversal : It is the number of boxes required to change from a column of Xs to a column of Os or from a column of Os to a column of Xs. Default value is 3 (most used). For example if you choose reversal = 2 then you get the chart similar to Renko chart.
Source: Closing price or High-Low prices can be chosen as data source for P&F charting.
Chart Style: There are 3 options for chart style: “Candle”, “Area” or “Don’t show”.
As Area:
As Candle:
X/O Column Style: it can show all columns from opening price or only last Xs/Os.
Color Theme: different themes exist => Green/Red, Yellow/Blue, White/Yellow, Orange/Blue, Lime/Red, Blue/Red
Show Breakouts is the option to show Breakouts
This tool detects & shows following Breakouts:
Triple Top/Bottom,
Triple Top Ascending,
Triple Bottom Descending,
Simple Buy/Sell (Double Top/Bottom),
Simple Buy With Rising Bottom,
Simple Sell With Declining Top
Catapult bullish/bearish
Show Horizontal Count Targets: Finds the congestion or consolidation pattern and if there is breakout then it calculates the Target by using Horizontal Count method (based on the width of congestion pattern). It shows how many column exist on congestion area. There is no guarantee that prices will reach the target.
Show Vertical Count Targets: When Triple Top/Bottom Breakouts occured the script calculates the target by using Vertical Count Method (based on the length of the column). There is no guarantee that prices will reach the target.
For both methods there is auto target cancellation if price goes below congestion bottom or above congestion top.
trend is calculated by EMA of closing price of the P&F
Whipsaw protection:
Last options are “Show info panel” and Labeling Offset. Script shows current box size, reversal, and recommanded minimum and maximum box size. And also it shows the price level to reverse the column (Xs <-> Os) and the price level to add at least 1 more box to column. This is the option to put these labels 10, 20, 30, 50 or 100 bars away from the last bar. Labeling content and color change according to X/O column.
do not hesitate to comment.
스크립트에서 "马斯克+100万"에 대해 찾기
Technical Analysis - Panel Info//A. Oscillators & B. Moving Averages base on TradingView's Technical Analysis by ThiagoSchmitz
//C.Pivot base on Ultimate Pivot Points Alerts by elbartt
//D. Summary & Panel info by anhnguyen14
Panel Info base on these indicators:
A. Oscillators
1. Rsi (14)
2. Stochastic (14,3,3)
3. CCI (20)
4. ADX (14)
5. AO
6. Momentum (10)
7. MACD (12,26)
8. Stoch RSI (3,3,14,14)
9. %R (14)
10. Bull bear
11. UO (7,14,28)
B. Moving Averages
1. SMA & EMA: 5-10-20-30-50-100-200
2. Ichimoku Cloud - Baseline (26)
3. Hull MA (9)
C. Pivot
1. Traditional
2. Fibonacci
3. Woodie
4. Camarilla
D. Summary
Sum_red=A_red+B_red+C_red
Sum_blue=A_blue+B_blue+C_blue
sell_point=(Sum_red/32)*100
buy_point=(Sum_blue/32)*100
sell =
Sum_red>Sum_blue
and sell_point>50
Strong_sell =
A_red>A_blue
and B_red>B_blue
and C_red>C_blue
and sell_point>50
and not crossunder(sell_point,75)
buy =
Sum_red>Sum_blue
and buy_point>50
Strong_buy =
A_red50
and not crossunder(buy_point,75)
neutral = not sell and not Strong_sell and not buy and not Strong_buy
CCI RiderThis is my thank you to the TradingView community, for the people who are sharing their scripts, which allowed me to learn Pine Script.
So here is my first creation, feel free to experiment, modify and use it as you wish.
It is a CCI(default value is 100, can be changed), combined with an EMA of that CCI(default 21,changeable) that then colors the background according to the strength of the signal(if selected to do so).
To generate strong signals, it also uses Bollinger Bands to prevent whipsaws in high volatility situations.
The best signals are generated when the CCI crosses the limits set by the user (default is 100/-100), and is above/belov its EMA.
Exit signals are indicated, when the CCI crosses its EMA.
Unfortunately in strong trends, this exit signal is sometimes premature, using a 3x resolution of the indicator will improve this, maybe I will implement this in a later version.
I use it mostly in 15min charts and higher, I found in shorter timeframes still a lot of whipsaws, maybe experimenting with different lengths and levels will improve this.
As the Indicator allows the user to experiment with different lenghts and levels, and the colors will change according the setting, I find it a nice tool to search for the best mixture for different securities and timeframes.
See below an example of a nice signal.
I do suggest to use it in combination with other indicators.
Yield Curve Version 2.55.2Welcome to Yield Curve Version 2.55.2
US10Y-US02Y
* Please read description to help understand the information displayed.
* NOTE - This script requires 1 real time update before accurate information is displayed, therefore WILL NOT display the correct information if the Bond Market is Closed over the Weekend.
* NOTE - When values are changed Via Input setting they do take a bit to display based off all the information that is required to display this script.
**FEATURES**
* Input Features let you view the information the way YOU like via Input Settings
* Displays Current Version Title - Toggleable On/Off via Input Settings - Default On
* Plots the Yield Curve of the Bonds listed (Middle Green and Red Line)
* Displays the Spread for each Bond (Top Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On
* Displays the current Yield for each Bond (Bottom Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On - Large Size
* Plots the Average of the Entire Yield Curve (BLUE Line within the Yield Curve) - Toggleable On/Off via Input Settings - Default On
* Displays messages based off Yield Inversions (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Displays 2 10 Inversion Warning Message (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Plots Column Data at the Bottom that tries to help determine the Stability of the Yield Curve (More information Below about Stability) - Toggleable On/Off via Input Settings - Default On
* Plots the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD (More information Below about Stability Max Overload) - Toggleable On/Off via Input Settings - Default On for 100 SMA , 20 SMA and 7 SMA
* Ability to Display Indicator Name and Value via Input Settings - Default On - Displays Stability Max Overload SMA Labels. Toggleable to Non SMA Values. See Below.
**Bottom Columns are all about STABILITY**
* I have tried to come up with an algorithm that helps understand the Stability of the Yield Curve. There are 3 Sections to the Bottom Columns.
* Section 1 - STABILITY (Displayed as the lightest Green or Red Column) Values range from 0 to 1 where 1 equals the MOST UNSTABLE Curve and 0 equals the MOST STABLE Curve
* Section 2 - STABILITY OVERLOAD (Displayed just above the Stability Column a shade darker Green or Red Column)
* Section 3 - STABILITY MAX OVERLOAD (Displayed just above the Stability Overload Column a shade darker Green or Red Column)
What this section tries to do is help understand the Stability of the Curve based on the inversions data. Lower values represent a MORE STABLE curve. If the Yield Curve currently has 0 Inversions all Stability factors should equal 0 and therefore not plot any lower columns. As the Yield Curve becomes more inverted each section represents a value based off that data. GREEN columns represent a MORE Stable Curve from the resolution prior and vise versa.
(S SO SMO)
STABILITY - tests the current Stability of the Curve itself again ranging from 0 to 1 where 0 equals the MOST Stable Curve and 1 equals the MOST Unstable Curve.
STABILIY OVERLOAD - adds a value to STABLITY based off STABILITY itself.
STABILITY MAX OVERLOAD - adds the Entire value to STABILITY derived again from STABILITY.
This section also allows us to see the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD which should always be the GREATEST of ALL STABILTY VALUES.
*Indicator Labels How to use*
Indicator Labels by default are turned On and will display Name and Value Labels for Stability Max Overload SMA values. To switch to (S SO SMO) Labels, toggle "Indicator Labels / SMO SMA Labels", via Input Settings. This button allows you to switch between the two Indicator Label Display options. You must have "Indicators" turned On to view the Labels and therefore is turned On by Default. To turn all of the Indicator Labels Off, simply disable "Indicators" via Input Settings.
Remember - All information displayed can be tuned On or Off besides the Curve itself. There are also other Features Accessible Via the Input Settings.
I will continue to update this script as there is more information I would like to gather and display!
I hope you enjoy,
OpptionsOnly
Ultimate Moving Average Package (17 MA's)Included is the:
VWAP
Current time frame 10 EMA
Current time frame 20 EMA
Current time frame 50 EMA
Current time frame 10 SMA
Current time frame 20 SMA
Current time frame 50 SMA
Daily 10 EMA
Daily 20 EMA
Daily 50 EMA
Daily 50 SMA
Daily 100 SMA
Daily 200 SMA
Weekly 100 SMA
Weekly 200 SMA
Monthly 100 SMA
Monthly 200 SMA
All Daily/Weekly/Monthly MA's can be seen on intraday charts. Current time frame MA's change depending on your time frame. Obviously you dont need all 17 on your chart but you can pick the ones you like and disable the rest.
Bilateral Stochastic Oscillator - For The Sake Of EfficiencyIntroduction
The stochastic oscillator is a feature scaling method commonly used in technical analysis, this method is the same as the running min-max normalization method except that the stochastic oscillator is in a range of (0,100) while min-max normalization is in a range of (0,1). The stochastic oscillator in itself is efficient since it tell's us when the price reached its highest/lowest or crossed this average, however there could be ways to further develop the stochastic oscillator, this is why i propose this new indicator that aim to show all the information a classical stochastic oscillator would give with some additional features.
Min-Max Derivation
The min-max normalization of the price is calculated as follow : (price - min)/(max - min) , this calculation is efficient but there is alternates forms such as :
price - (max - min) - min/(max - min)
This alternate form is the one i chosen to make the indicator except that both range (max - min) are smoothed with a simple moving average, there are also additional modifications that you can see on the code.
The Indicator
The indicator return two main lines, in blue the bull line who show the buying force and in red the bear line who show the selling force.
An orange line show the signal line who represent the moving average of the max(bull,bear), this line aim to show possible exit/reversals points for the current trend.
Length control the highest/lowest period as well as the smoothing amount, signal length control the moving average period of the signal line, the pre-filtering setting indicate which smoothing method will be used to smooth the input source before applying normalization.
The default pre-filtering method is the sma.
The ema method is slightly faster as you can see above.
The triangular moving average is the moving average of another moving average, the impulse response of this filter is a triangular function hence its name. This moving average is really smooth.
The lsma or least squares moving average is the fastest moving average used in this indicator, this filter try to best fit a linear function to the data in a certain window by using the least squares method.
No filtering will use the source price without prior smoothing for the indicator calculation.
Relationship With The Stochastic Oscillator
The crosses between the bull and bear line mean that the stochastic oscillator crossed the 50 level. When the Bull line is equal to 0 this mean that the stochastic oscillator is equal to 0 while a bear line equal to 0 mean a stochastic oscillator equal to 100.
The indicator and below a stochastic oscillator of both period 100
Using Levels
Unlike a stochastic oscillator who would clip at the 0 and 100 level the proposed indicator is not heavily constrained in a range like the stochastic oscillator, this mean that you can apply levels to trigger signals
Possible levels could be 1,2,3... even if the indicator rarely go over 3.
Its then possible to create strategies using such levels as support or resistance one.
Conclusion
I've showed a modified stochastic oscillator who aim to show additional information to the user while keeping all the information a classical stochastic oscillator would give. The proposed indicator is no longer constrained in an hard range and posses more liberty to exploit its scale which in return allow to create strategies based on levels.
For pinescript users what you can learn from this is that alternates forms of specific formulas can be extremely interesting to modify, changes can be really surprising so if you are feeling stuck, modifying alternates forms of know indicators can give great results, use tools such as sympy gamma to get alternates forms of formulas.
Thanks for reading !
If you are looking for something or just want to say thanks try to pm me :)
High/Low bandsGives good idea about trend.
In last 100 days the lowest price was this.
In last 100 days the highest price was this.
Price makes new 100 days high! (uptrend)
Chaikin MF% (CMFP) w. Alerts, Bells & Whistles [LucF]This is Chaikin’s Money Flow indicator on a 0-100 scale with buy/sell signals, alerts and other bells & whistles.
It includes:
- a fast EMA (16 periods by default),
- a slow MA (64 periods by default),
- histograms,
- 3 different sorts of crosses,
- big swings identification,
- buy/sell signals on CMFP crossing back from outside user-defined levels,
- buy/sell signals on the slow MA pivots above/below user-defined levels,
- alerts on big swings and buy/sells.
This indicator started with @LazyBear code (VAPI) at:
@cI8DH then changed the scale to 0-100, which I find very useful:
I then added the rest.
The chart above shows both clean and busy versions of the indicator.
Note that the default length is 10 rather than the commonly used 20. I use CMFP in conjunction with VFI and like the fact that it is faster than VFI. The default inputs show the way I normally use this indicator, with the slow MA shown in histogram mode. I find it gives good context to the signal line. Crosses between the two are often useful.
The buy/sell signals aren’t the main attraction of this indicator, and nothing to write home about. Like the big swing markers, I think it’s more realistic to view them as pointers to potentially interesting areas on charts. Their nature makes them more suited to identifying reversals. They certainly aren’t reliable enough to turn this study into a strategy and I normally don’t use them. The levels pre-defined for the buy/sell signals on CMFP are most useful on short intervals. The buy/sell signals on the slow MA pivots work on a more complete range of intervals. Optimization for your specific instruments and intervals will improve their reliability.
As usual when defining alerts, be sure you already have defined proper inputs and that you are on the intended interval, as they will be used when triggering alerts.
3 of SlowStochastics
스토캐스틱 3개를 한번에 볼수 있습니다. 천장과 바닥은 각 100의 위치마다 존재합니다
You can see three slow stochastics at once. The ceiling and floor are located at each 100 (0 - 100 - 200- 300)
Percentage Price Oscillator (PPO)The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. First, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
Calculations
PPO: {(12-day EMA - 26-day EMA)/26-day EMA} x 100
Signal Line: 9-day EMA of PPO
PPO Histogram: PPO - Signal Line
While MACD measures the absolute difference between two moving averages, PPO makes this a relative value by dividing the difference by the slower moving average (26-day EMA). PPO is simply the MACD value divided by the longer moving average. The result is multiplied by 100 to move the decimal place two spots.
Interpretation
As with MACD, the PPO reflects the convergence and divergence of two moving averages. PPO is positive when the shorter moving average is above the longer moving average. The indicator moves further into positive territory as the shorter moving average distances itself from the longer moving average. This reflects strong upside momentum. The PPO is negative when the shorter moving average is below the longer moving average. Negative readings grow when the shorter moving average distances itself from the longer moving average (goes further negative). This reflects strong downside momentum. The histogram represents the difference between PPO and its 9-day EMA, the signal line. The histogram is positive when PPO is above its 9-day EMA and negative when PPO is below its 9-day EMA. The PPO-Histogram can be used to anticipate signal line crossovers in the PPO.
MACD, PPO and Price
MACD levels are affected by the price of a security. A high-priced security will have higher or lower MACD values than a low-priced security, even if volatility is basically equal. This is because MACD is based on the absolute difference in the two moving averages. Because MACD is based on absolute levels, large price changes can affect MACD levels over an extended period of time. If a stock advances from 20 to 100, its MACD levels will be considerably smaller around 20 than around 100. The PPO solves this problem by showing MACD values in percentage terms.
Conclusions
The Percentage Price Oscillator (PPO) generates the same signals as the MACD, but provides an added dimension as a percentage version of MACD. The PPO levels of the Dow Industrials (price > 20K) can be compared against the PPO levels of IBM (price < 200) because the PPO “levels” the playing field. In addition, PPO levels in one security can be compared over extended periods of time, even if the price has doubled or tripled. This is not the case for the MACD.
Limitations
Despite its advantages, the PPO is still not the best oscillator to identify overbought or oversold conditions because movements are unlimited (in theory). Levels for RSI and the Stochastic Oscillator are limited and this makes them better suited to identify overbought and oversold levels.
Source: Stockcharts
Multiple Moving AveragesThis is really simple. But useful for me as I don't have a paid account. No-pro users can only use 3 indicators at once and because I rely heavily on simple moving averages it can be a real pain.
This one indicator features:
20 MA
50 MA
100 MA
200 MA
which I find are the most useful overall. The 20 and 50 over all time frame but in particular < 1 day, the 100 and 200 at > 4 hr time frames. In general I don't use the 100 MA that much. The daily 200 MA is a critical support for many assets like stocks and cryptos. I'm by no means a pro and if you are learning I recommend becoming familiar with moving averages right at the beginning.
If you want to deactivate some of the lines, you can do it via the indicator's settings icon.
Exponential Moving Average (Set of 3) [Krypt] + 13/34 EMAsI took Krypt's script and essentially added on to it.
the 20/50/100/200 EMAs should be used together as support and resistance as normal.
Wait for price to break 200 EMA
Wait for 50 EMA to cross 200 EMA
Wait for pullback to 50 EMA to open position
20 and 100 EMAs are for extra information about moving support and resistance
and 13/34 EMAs should be used in conjunction
When 13 EMA crosses 34 EMA, open position
When price gets far from 13/34, close position (because price will attempt to revert back to mean)
This is better for scalping and swing trades than the 20/50/100/200 setup.
Twitter: @AzorAhai06
Ichimoku Cloud Score v1.0This script calculates a simple Ichimoku Score based on the signals documented here , with a few additions. Each of the score components can be individually weighted via the script inputs . The output is a plot of the normalized Ichimoku score, in the range of -100 to 100.
This script has been heavily modified from 'Ichimoku Cloud Signal Score v2.0.0 '. Credit to user 'dashed' for the initial implementation.
This has been modified with several refinements:
Clean/Organized Code
Simplified Inputs
Improved Style
Scores normalized to a range (-100, 100)
Bugfixes and Improvements
Script Inputs: i.imgur.com
Volume RatioDefinition:
Volume ratio can be obtained in a similar way to RSI.
Volume Ratio (%) = 100 - 100/(1+vr)
The parameter "vr" is defined as
vr=(A+U/2)/(D+U/2)
A=Total volume of the periods when the price advanced
D=Total volume of the periods when the price declined
U=Total volume of the periods when the price unchanged
After substitution, following expression can be derived and the denominator represents total volume of all periods.
Volume Ratio (%) = 100 x (A+U/2)/(A+D+U)
Notes:
A similar method to interpret RSI can be employed.
1) Overbought level over 70% and oversold level under 30%. These levels need to be adjusted according to the periods, time frames and issues.
2) Bullish picture over 50% line and bearish picture under 50% line.
3) Crossing oversold level to the upside can be taken as a confirmation of bullish reversal. - and vice versa for a bearish reversal.
4) After a long-term bearish market, the increase of volume can happen in the early stage of a bullish market.
5) Buying opportunity can be suggested when the volume ratio is declining and the price is either advancing or leveling off.
CCI with Volume Weighted EMA Here is an attempt to improve on the CCI using a volume weighted ema which is then plugged into the CCI formula.
Use:
The CCI with VW EMA is an oscillator that gives readings between -100 and +100. The usual use is to 'go long' with values over +100 and short on values less than -100.
Another use of this oscillator is a countertrend indicator where one sells at crosses under +100 and buys on crosses over -100.
Multi-Functional Fisher Transform MTF with MACDL TRIGGERWhat this indicator gives you is a true signal when price is exhausted and ready for a fast turnaround. Fisher Transform is set for multi-time frame and also allows the user to change the length. This way a user can compare two or more time spans and lengths to look for these MACDL divergent triggers after a Fisher exhaustion. With so many indicators, it's probably best to merge these indicators and change the Fisher and Trigger colors so you can still have a look at price action (remember to scale right after merger). I've noticed from time to time when you have Fisher 34 100 and 300 up and running on two different time frames such as 5 and 15 min charts, with MACDL triggers on the 100/300 or 34/100 you get a high probability trade trigger. However, there are rare exceptions such as when price moves in a parabolic state up or down for a long period where this indication does not work. Ideally this indicator works best in a sideways market or slow rising/descending moving market.
This indicator was worked on by Glaz, nmike and myself
LazyBear also introduced the MACDL indicator
CCI Crossover AlertThis very simple indicator will give you a blue background where the CCI crossed from below -100 to above -100, and a red background where it crossed from above 100 to below 100.
NormalizedIndicatorsNormalizedIndicators - Comprehensive Trend Normalization Library
Overview
This Pine Script™ library provides an extensive collection of normalized trend-following indicators and calculation functions for technical analysis. The main advantage of this library lies in its unified signal output: All trend indicators are normalized to a standardized format where 1 represents a bullish signal, -1 represents a bearish signal, and 0 (where applicable) represents a neutral signal.
This normalization enables traders to seamlessly combine different indicators, create consensus signals, and develop complex multi-indicator strategies without worrying about different scales and interpretations.
📊 Categories
The library is divided into two main categories:
1. Trend-Following Indicators
2. Calculation Indicators
🔄 Trend-Following Indicators
Stationary Indicators
These oscillate around a fixed value and are not bound to price.
BBPct() - Bollinger Bands Percent
Source: Algoalpha X Sushiboi77
Parameters:
Length: Period for Bollinger Bands
Factor: Standard deviation multiplier
Source: Price source (typical: close)
Logic: Calculates the position of price within the Bollinger Bands as a percentage
Signal:
1 (bullish): when positionBetweenBands > 50
-1 (bearish): when positionBetweenBands ≤ 50
Special Feature: Uses an array to store historical standard deviations for additional analysis
RSI() - Relative Strength Index
Source: TradingView
Parameters:
len: RSI period
src: Price source
smaLen: Smoothing period for RSI
Logic: Classic RSI with additional SMA smoothing
Signal:
1 (bullish): RSI-SMA > 50
-1 (bearish): RSI-SMA < 50
0 (neutral): RSI-SMA = 50
Non-Stationary Indicators
These follow price movement and have no fixed boundaries.
NorosTrendRibbonSMA() & NorosTrendRibbonEMA()
Source: ROBO_Trading
Parameters:
Length: Moving average and channel period
Source: Price source
Logic: Creates a price channel based on the highest/lowest MA value over a specified period
Signal:
1 (bullish): Price breaks above upper band
-1 (bearish): Price breaks below lower band
0 (neutral): Price within channel (maintains last state)
Difference: SMA version uses simple moving averages, EMA version uses exponential
TrendBands()
Source: starlord_xrp
Parameters: src (price source)
Logic: Uses 12 EMAs (9-30 period) and checks if all are rising or falling simultaneously
Signal:
1 (bullish): All 12 EMAs are rising
-1 (bearish): All 12 EMAs are falling
0 (neutral): Mixed signals
Special Feature: Very strict conditions - extremely strong trend filter
Vidya() - Variable Index Dynamic Average
Source: loxx
Parameters:
source: Price source
length: Main period
histLength: Historical period for volatility calculation
Logic: Adaptive moving average that adjusts to volatility
Signal:
1 (bullish): VIDYA is rising
-1 (bearish): VIDYA is falling
VZO() - Volume Zone Oscillator
Parameters:
source: Price source
length: Smoothing period
volumesource: Volume data source
Logic: Combines price and volume direction, calculates the ratio of directional volume to total volume
Signal:
1 (bullish): VZO > 14.9
-1 (bearish): VZO < -14.9
0 (neutral): VZO between -14.9 and 14.9
TrendContinuation()
Source: AlgoAlpha
Parameters:
malen: First HMA period
malen1: Second HMA period
theclose: Price source
Logic: Uses two Hull Moving Averages for trend assessment with neutrality detection
Signal:
1 (bullish): Uptrend without divergence
-1 (bearish): Downtrend without divergence
0 (neutral): Trend and longer MA diverge
LeonidasTrendFollowingSystem()
Source: LeonidasCrypto
Parameters:
src: Price source
shortlen: Short EMA period
keylen: Long EMA period
Logic: Simple dual EMA crossover system
Signal:
1 (bullish): Short EMA < Key EMA
-1 (bearish): Short EMA ≥ Key EMA
ysanturtrendfollower()
Source: ysantur
Parameters:
src: Price source
depth: Depth of Fibonacci weighting
smooth: Smoothing period
bias: Percentage bias adjustment
Logic: Complex system with Fibonacci-weighted moving averages and bias bands
Signal:
1 (bullish): Weighted MA > smoothed MA (with upward bias)
-1 (bearish): Weighted MA < smoothed MA (with downward bias)
0 (neutral): Within bias zone
TRAMA() - Trend Regularity Adaptive Moving Average
Source: LuxAlgo
Parameters:
src: Price source
length: Adaptation period
Logic: Adapts to trend regularity - accelerates in stable trends, slows in consolidations
Signal:
1 (bullish): Price > TRAMA
-1 (bearish): Price < TRAMA
0 (neutral): Price = TRAMA
HullSuite()
Source: InSilico
Parameters:
_length: Base period
src: Price source
_lengthMult: Length multiplier
Logic: Uses Hull Moving Average with lagged comparisons for trend determination
Signal:
1 (bullish): Current Hull > Hull 2 bars ago
-1 (bearish): Current Hull < Hull 2 bars ago
0 (neutral): No change
STC() - Schaff Trend Cycle
Source: shayankm (described as "Better MACD")
Parameters:
length: Cycle period
fastLength: Fast MACD period
slowLength: Slow MACD period
src: Price source
Logic: Combines MACD concepts with stochastic normalization for early trend signals
Signal:
1 (bullish): STC is rising
-1 (bearish): STC is falling
🧮 Calculation Indicators
These functions provide specialized mathematical calculations for advanced analysis.
LCorrelation() - Long-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (30, 60, 90, 120, 150, 180)
Returns: Correlation value between -1 and 1
Application: Long-term relationship analysis between assets, markets, or indicators
MCorrelation() - Medium-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (15, 30, 45, 60, 75, 90)
Returns: Correlation value between -1 and 1
Application: Medium-term relationship analysis with higher sensitivity
assetBeta() - Beta Coefficient
Creator: unicorpusstocks
Parameters:
measuredSymbol: The asset to be measured
baseSymbol: The reference asset (e.g., market index)
Logic:
Calculates Beta across 4 different time horizons (50, 100, 150, 200 periods)
Beta = Correlation × (Asset Standard Deviation / Market Standard Deviation)
Returns the average of all 4 Beta values
Returns: Beta value (typically 0-2, can be higher/lower)
Interpretation:
Beta = 1: Asset moves in sync with the market
Beta > 1: Asset more volatile than market
Beta < 1: Asset less volatile than market
Beta < 0: Asset moves inversely to the market
💡 Usage Examples
Example 1: Multi-Indicator Consensus
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
// Combine multiple indicators
signal1 = lib.BBPct(20, 2.0, close)
signal2 = lib.RSI(14, close, 5)
signal3 = lib.TRAMA(close, 50)
// Consensus signal: At least 2 of 3 must agree
consensus = (signal1 + signal2 + signal3)
strongBuy = consensus >= 2
strongSell = consensus <= -2
Example 2: Correlation-Filtered Trading
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
// Only trade when strong correlation with market exists
spy = request.security("SPY", timeframe.period, close)
correlation = lib.MCorrelation(close, spy)
trendSignal = lib.NorosTrendRibbonEMA(50, close)
// Only bullish signals with positive correlation
tradeBuy = trendSignal == 1 and correlation > 0.5
tradeSell = trendSignal == -1 and correlation > 0.5
Example 3: Beta-Adjusted Position Sizing
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
spy = request.security("SPY", timeframe.period, close)
beta = lib.assetBeta(close, spy)
// Adjust position size based on Beta
basePositionSize = 100
adjustedSize = basePositionSize / beta // Less size with high Beta
⚙️ Technical Details
Normalization Standard
Bullish: 1
Bearish: -1
Neutral: 0 (only for selected indicators)
Advantages of Normalization
Simple Aggregation: Signals can be added/averaged
Consistent Interpretation: No confusion about different scales
Strategy Development: Simplified logic for backtesting
Combinability: Seamlessly mix different indicator types
Performance Considerations
All functions are optimized for Pine Script v5
Proper use of var for state management
Efficient array operations where needed
Minimal recursive calls
📋 License
This code is subject to the Mozilla Public License 2.0. More details at: mozilla.org
🎯 Use Cases
This library is ideal for:
Quantitative Traders: Systematic strategy development with unified signals
Multi-Timeframe Analysis: Consensus across different timeframes
Portfolio Managers: Beta and correlation analysis for diversification
Algo Traders: Machine learning with standardized features
Retail Traders: Simplified signal interpretation without deep technical knowledge
🔧 Installation
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1
Then use the functions with your chosen alias:
pinescriptlib.BBPct(20, 2.0, close)
lib.RSI(14, close, 5)
// etc.
⚠️ Important Notes
All indicators are lagging, as is typical for trend-following indicators
Signals should be combined with additional analysis (volume, support/resistance, etc.)
Backtesting is recommended before starting live trading with these signals
Different assets and timeframes may require different parameter optimizations
This library provides a solid foundation for professional trading system design with the flexibility to develop your own complex strategies while abstracting away technical complexity.
Sentiment Heatmap with EMA Sentiment Heatmap with EMA Let’s build a script mini-LuxAlgo-style sentiment heatmap Enhanced Simple Sentiment Heatmap + Right-Side Legend Automatic legend on the right side
Just like professional indicators:
MAX GREED
GREED
NEUTRAL
FEAR
MAX FEAR
✔ Legend stays updated on the last bar
It moves automatically as price moves.
✔ Trend EMA included (optional) 9 EMA → White
20 EMA → Red
50 EMA → Yellow
100 EMA → Blue
200 EMA → Purple Alerts (e.g., “Max Fear – Buy Zone”)
✔ Liquidity line / support-resistance auto zones Full sentiment heatmap (Greed → Fear)
✔ Right-side legend like LuxAlgo
✔ All 5 EMAs added (my colors): EMA trend cloud (9/20, 20/50, 50/200)
Buy/Sell circles based on sentiment reversals Right-side legend: MAX GREED / GREED / NEUTRAL / FEAR / MAX FEAR
5 EMAs:
9 → White
20 → Red
50 → Yellow
100 → Blue
200 → Purple
Sav Fx Dynamic P & D°//@version=5
indicator("Sav Fx Dynamic P & D°", overlay = true, max_boxes_count = 50, max_labels_count = 2, max_lines_count = 10)
// Global Settings (visible)
customLineColor = input.color(#000000, "True Open", group = "Global Settings")
// Input for custom sessionTypeText size and width
sessionTypeTextSize = input.string("small", "Session Type Text Size", options= , group="Text Settings")
// On/Off switches for each open line
show90MinuteCycleOpen = input.bool(true, "90 Minute Cycle Open", group="Open Lines")
showTrueNewYorkOpen = input.bool(true, "True New York Open", group="Open Lines")
showTrueDayOpen = input.bool(true, "True Day Open", group="Open Lines")
showTrueWeekOpen = input.bool(true, "True Week Open", group="Open Lines")
showTrueMonthOpen = input.bool(false, "True Month Open", group="Open Lines")
IsTime(h, m, timezone) =>
not na(time) and hour(time, timezone) == h and minute(time, timezone) == m
IsSession(sess, timezone) =>
not na(time(timeframe.period, sess, timezone))
is6_00Session = IsSession("0600-0730", "America/New_York")
is7_30Session = IsSession("0730-0900", "America/New_York")
is9_00Session = IsSession("0900-1030", "America/New_York")
is10_30Session = IsSession("1030-1200", "America/New_York")
var MOPLine = line.new(na, na, na, na, color = customLineColor, width = 1, style = line.style_dashed)
var MOPLabel = label.new(na, na, text = "True Day Open", color = color.rgb(120, 123, 134, 100), textcolor = customLineColor, size = size.small, style = label.style_label_left)
var float trueDayOpen = na
if showTrueDayOpen
if IsTime(0, 0, "America/New_York")
line.set_xy1(MOPLine, bar_index, open)
line.set_xy2(MOPLine, bar_index, open)
label.set_xy(MOPLabel, bar_index, open)
trueDayOpen := open
if barstate.islast
line.set_x2(MOPLine, bar_index + 20)
label.set_x(MOPLabel, bar_index + 20)
else
line.delete(MOPLine)
label.delete(MOPLabel)
var NYTrueOpenLine = line.new(na, na, na, na, color = customLineColor, width = 1, style = line.style_dashed)
var NYTrueOpenLabel = label.new(na, na, text = "True New York Open", color = color.rgb(105, 130, 218, 100), textcolor = customLineColor, size = size.small, style = label.style_label_left)
var float NYTrueOpen = na
if showTrueNewYorkOpen
if IsTime(1, 30, "America/New_York") or IsTime(7, 30, "America/New_York") or IsTime(13, 30, "America/New_York")
line.set_xy1(NYTrueOpenLine, bar_index, open)
line.set_xy2(NYTrueOpenLine, bar_index, open)
label.set_xy(NYTrueOpenLabel, bar_index, open)
NYTrueOpen := open
if IsTime(1, 30, "America/New_York")
label.set_text(NYTrueOpenLabel, "True London Open")
if IsTime(7, 30, "America/New_York")
label.set_text(NYTrueOpenLabel, "True New York Open")
if IsTime(13, 30, "America/New_York")
label.set_text(NYTrueOpenLabel, "True PM Session Open")
if barstate.islast
line.set_x2(NYTrueOpenLine, bar_index + 20)
label.set_x(NYTrueOpenLabel, bar_index + 20)
else
line.delete(NYTrueOpenLine)
label.delete(NYTrueOpenLabel)
var lookahead_bars = 20
var MondayLine = line.new(na, na, na, na, color = customLineColor, width = 1, style = line.style_dashed)
var MondayLabel = label.new(na, na, text = timeframe.isintraday and timeframe.multiplier >= 5 ? "True week Open" : "", color = #9b27b000, textcolor = customLineColor, size = size.small, style = label.style_label_left)
if showTrueWeekOpen
if dayofweek == dayofweek.monday and IsTime(18, 0, "America/New_York")
line.set_xy1(MondayLine, bar_index, close)
line.set_xy2(MondayLine, bar_index, close)
label.set_xy(MondayLabel, bar_index, close)
if barstate.islast
line.set_x2(MondayLine, bar_index + lookahead_bars)
label.set_x(MondayLabel, bar_index + lookahead_bars)
else
line.delete(MondayLine)
label.delete(MondayLabel)
var ninetyMinuteCycleLine = line.new(na, na, na, na, color = customLineColor, width = 1, style = line.style_dashed)
var ninetyMinuteCycleLabel = label.new(na, na, text = "90 Minute Cycle True Open", color = #4caf4f00, textcolor = customLineColor, size = size.small, style = label.style_label_left)
if show90MinuteCycleOpen
if IsTime(3, 23, "America/New_York") or IsTime(9, 23, "America/New_York") or IsTime(15, 23, "America/New_York")
line.set_xy1(ninetyMinuteCycleLine, bar_index, open)
line.set_xy2(ninetyMinuteCycleLine, bar_index, open)
label.set_xy(ninetyMinuteCycleLabel, bar_index, open)
if IsTime(3, 23, "America/New_York")
label.set_text(ninetyMinuteCycleLabel, "03:23 Cycle True Open")
if IsTime(9, 23, "America/New_York")
label.set_text(ninetyMinuteCycleLabel, "09:23 Cycle True Open")
if IsTime(15, 23, "America/New_York")
label.set_text(ninetyMinuteCycleLabel, "15:23 Cycle True Open")
if barstate.islast
line.set_x2(ninetyMinuteCycleLine, bar_index + lookahead_bars)
label.set_x(ninetyMinuteCycleLabel, bar_index + lookahead_bars)
else
line.delete(ninetyMinuteCycleLine)
label.delete(ninetyMinuteCycleLabel)
var monthOpenLine = line.new(na, na, na, na, color = customLineColor, width = 1, style = line.style_dashed)
var monthOpenLabel = label.new(na, na, text = "True Month Open", color = #ff990000, textcolor = customLineColor, size = size.small, style = label.style_label_left)
isSecondWeekSunday = dayofweek == dayofweek.sunday and (dayofmonth >= 8 and dayofmonth <= 14)
if showTrueMonthOpen
if isSecondWeekSunday and IsTime(18,0, "America/New_York")
line.set_xy1(monthOpenLine, bar_index, close)
line.set_xy2(monthOpenLine, bar_index + lookahead_bars, close)
label.set_xy(monthOpenLabel, bar_index, close)
if barstate.islast
line.set_x2(monthOpenLine, bar_index + lookahead_bars)
label.set_x(monthOpenLabel, bar_index + lookahead_bars)
else
line.delete(monthOpenLine)
label.delete(monthOpenLabel)
directionalBias = "N/A"
if is6_00Session or is7_30Session or is9_00Session or is10_30Session
directionalBias := open > NYTrueOpen ? "Bullish" : "Bearish"
var directionalBiasLabel = label.new(na, na, text = "Directional Bias: " + directionalBias, color = na, textcolor = customLineColor, size = size.normal, style = label.style_label_left)
if barstate.islast
label.set_x(directionalBiasLabel, bar_index + lookahead_bars)
label.set_text(directionalBiasLabel, "Directional Bias: " + directionalBias)
var float WeekOpen = na
if dayofweek == dayofweek.monday and IsTime(18, 0, "America/New_York")
WeekOpen := close
if showTrueWeekOpen
line.set_xy1(MondayLine, bar_index, close)
line.set_xy2(MondayLine, bar_index, close)
label.set_xy(MondayLabel, bar_index, close)
// New table for static session type display
var sessionTable = table.new(position.bottom_right, 1, 1, bgcolor = #b9b9bab8)
// Update the table.cell function call
if barstate.islast and not na(trueDayOpen) and not na(NYTrueOpen) and not na(WeekOpen)
var string sessionTypeText = syminfo.ticker + " Dead Zone"
var color sessionColor = color.rgb(126, 126, 126, 65)
// Check conditions and set session type text and color accordingly
if close < trueDayOpen and close < NYTrueOpen and close < WeekOpen
sessionTypeText := syminfo.ticker + " Week Discount"
sessionColor := #ba4b4b59
else if close > trueDayOpen and close > NYTrueOpen and close > WeekOpen
sessionTypeText := syminfo.ticker + " Week Premium"
sessionColor := #4b56ba5a
else if close < trueDayOpen and close < NYTrueOpen and close > WeekOpen
sessionTypeText := syminfo.ticker + " Day Discount & Week Dead Zone"
sessionColor := #ba4b4b59
else if close > trueDayOpen and close > NYTrueOpen and close < WeekOpen
sessionTypeText := syminfo.ticker + " Day premium & Week Dead Zone"
sessionColor := #4b56ba5a
// Using only size input for session type text
table.cell(sessionTable, 0, 0, sessionTypeText, bgcolor = sessionColor, text_color = color.black, text_size = sessionTypeTextSize)
VIX 恐慌指數 VOO 抄底策略 VIX 恐慌指數 VOO 抄底策略
📊 策略目的
本策略利用 VIX 恐慌指數作為市場情緒指標,幫助投資人在市場極度恐慌時理性進場抄底,並透過客觀的技術訊號避免情緒化操作。適合用於捕捉 VOO(或其他美股 ETF)在恐慌性下跌後的反彈機會。
🎯 進出場條件
進場條件(同時滿足):
VIX 指數達到設定門檻以上(預設 25,可調整)
VIX 死亡交叉其均線(預設 5 日均線),確認恐慌情緒開始回落
出場條件(三種模式可選):
持有天數模式:持有達到設定天數後出場(預設 100 天)
VIX 回落模式:VIX 降至設定門檻以下時出場(預設 20)
兩者皆可模式:任一條件滿足即出場
⚠️ 重要警語
不適合槓桿型 ETF 抄底:VIX 反映的是市場波動度,使用槓桿 ETF(如 TQQQ、SOXL)會因為衰減效應和更大波動而增加風險,可能在恐慌期間造成更大虧損。
空頭市場失準風險:本策略假設市場會從恐慌中反彈,但在長期空頭或系統性風險(如 2008 金融危機、2022 升息循環)中,VIX 可能長期處於高檔,多次觸發買入訊號卻持續下跌,導致策略失效。
建議搭配大盤趨勢判斷:在多頭格局中使用效果較佳,空頭格局建議提高 VIX 門檻或暫停使用。
僅供參考,非投資建議:歷史績效不代表未來表現,請依個人風險承受度謹慎使用。
VIX Panic Index VOO Bottom-Fishing Strategy
📊 Strategy Overview
This strategy utilizes the VIX (Volatility Index) as a market sentiment indicator to help investors rationally enter positions during periods of extreme market panic, using objective technical signals to avoid emotional decision-making. It is designed to capture rebound opportunities in VOO (or other US equity ETFs) following panic-driven selloffs.
🎯 Entry and Exit Conditions
Entry Conditions (both must be met):
VIX reaches or exceeds the set threshold (default 25, adjustable)
VIX death crosses below its moving average (default 5-day MA), confirming panic sentiment is beginning to recede
Exit Conditions (three modes available):
Holding Period Mode: Exit after holding for the set number of days (default 100 days)
VIX Decline Mode: Exit when VIX falls below the set threshold (default 20)
Either Condition Mode: Exit when either condition is met
⚠️ Important Warnings
Not Suitable for Leveraged ETF Bottom-Fishing: VIX reflects market volatility. Using leveraged ETFs (such as TQQQ, SOXL) increases risk due to decay effects and greater volatility, potentially causing larger losses during panic periods.
Bear Market Inaccuracy Risk: This strategy assumes markets will rebound from panic. However, during prolonged bear markets or systemic risks (such as the 2008 financial crisis or 2022 rate hike cycle), VIX may remain elevated for extended periods, triggering multiple buy signals while prices continue declining, rendering the strategy ineffective.
Recommended to Combine with Market Trend Analysis: Works better in bull market conditions. In bear markets, consider raising VIX thresholds or suspending use.
For Reference Only, Not Investment Advice: Historical performance does not guarantee future results. Please use cautiously according to your personal risk tolerance.
SP500 Session Gap Fade StrategySummary in one paragraph
SPX Session Gap Fade is an intraday gap fade strategy for index futures, designed around regular cash sessions on five minute charts. It helps you participate only when there is a full overnight or pre session gap and a valid intraday session window, instead of trading every open. The original part is the gap distance engine which anchors both stop and optional target to the previous session reference close at a configurable flat time, so every trade’s risk scales with the actual gap size rather than a fixed tick stop.
Scope and intent
• Markets. Primarily index futures such as ES, NQ, YM, and liquid index CFDs that exhibit overnight gaps and regular cash hours.
• Timeframes. Intraday timeframes from one minute to fifteen minutes. Default usage is five minute bars.
• Default demo used in the publication. Symbol CME:ES1! on a five minute chart.
• Purpose. Provide a simple, transparent way to trade opening gaps with a session anchored risk model and forced flat exit so you are not holding into the last part of the session.
• Limits. This is a strategy. Orders are simulated on standard candles only.
Originality and usefulness
• Unique concept or fusion. The core novelty is the combination of a strict “full gap” entry condition with a session anchored reference close and a gap distance based TP and SL engine. The stop and optional target are symmetric multiples of the actual gap distance from the previous session’s flat close, rather than fixed ticks.
• Failure mode it addresses. Fixed sized stops do not scale when gaps are unusually small or unusually large, which can either under risk or over risk the account. The session flat logic also reduces the chance of holding residual positions into late session liquidity and news.
• Testability. All key pieces are explicit in the Inputs: session window, minutes before session end, whether to use gap exits, whether TP or SL are active, and whether to allow candle based closes and forced flat. You can toggle each component and see how it changes entries and exits.
• Portable yardstick. The main unit is the absolute price gap between the entry bar open and the previous session reference close. tp_mult and sl_mult are multiples of that gap, which makes the risk model portable across contracts and volatility regimes.
Method overview in plain language
The strategy first defines a trading session using exchange time, for example 08:30 to 15:30 for ES day hours. It also defines a “flat” time a fixed number of minutes before session end. At the flat bar, any open position is closed and the bar’s close price is stored as the reference close for the next session. Inside the session, the strategy looks for a full gap bar relative to the prior bar: a gap down where today’s high is below yesterday’s low, or a gap up where today’s low is above yesterday’s high. A full gap down generates a long entry; a full gap up generates a short entry. If the gap risk engine is enabled and a valid reference close exists, the strategy measures the distance between the entry bar open and that reference close. It then sets a stop and optional target as configurable multiples of that gap distance and manages them with strategy.exit. Additional exits can be triggered by a candle color flip or by the forced flat time.
Base measures
• Range basis. The main unit is the absolute difference between the current entry bar open and the stored reference close from the previous session flat bar. That value is used as a “gap unit” and scaled by tp_mult and sl_mult to build the target and stop.
Components
• Component one: Gap Direction. Detects full gap up or full gap down by comparing the current high and low to the previous bar’s high and low. Gap down signals a long fade, gap up signals a short fade. There is no smoothing; it is a strict structural condition.
• Component two: Session Window. Only allows entries when the current time is within the configured session window. It also defines a flat time before the session end where positions are forced flat and the reference close is updated.
• Component three: Gap Distance Risk Engine. Computes the absolute distance between the entry open and the stored reference close. The stop and optional target are placed as entry ± gap_distance × multiplier so that risk scales with gap size.
• Optional component: Candle Exit. If enabled, a bullish bar closes short positions and a bearish bar closes long positions, which can shorten holding time when price reverses quickly inside the session.
• Session windows. Session logic uses the exchange time of the chart symbol. When changing symbols or venues, verify that the session time string still matches the new instrument’s cash hours.
Fusion rule
All gates are hard conditions rather than weighted scores. A trade can only open if the session window is active and the full gap condition is true. The gap distance engine only activates if a valid reference close exists and use_gap_risk is on. TP and SL are controlled by separate booleans so you can use SL only, TP only, or both. Long and short are symmetric by construction: long trades fade full gap downs, short trades fade full gap ups with mirrored TP and SL logic.
Signal rule
• Long entry. Inside the active session, when the current bar shows a full gap down relative to the previous bar (current high below prior low), the strategy opens a long position. If the gap risk engine is active, it places a gap based stop below the entry and an optional target above it.
• Short entry. Inside the active session, when the current bar shows a full gap up relative to the previous bar (current low above prior high), the strategy opens a short position. If the gap risk engine is active, it places a gap based stop above the entry and an optional target below it.
• Forced flat. At the configured flat time before session end, any open position is closed and the close price of that bar becomes the new reference close for the following session.
• Candle based exit. If enabled, a bearish bar closes longs, and a bullish bar closes shorts, regardless of where TP or SL sit, as long as a position is open.
What you will see on the chart
• Markers on entry bars. Standard strategy entry markers labeled “long” and “short” on the gap bars where trades open.
• Exit markers. Standard exit markers on bars where either the gap stop or target are hit, or where a candle exit or forced flat close occurs. Exit IDs “long_gap” and “short_gap” label gap based exits.
• Reference levels. Horizontal lines for the current long TP, long SL, short TP, and short SL while a position is open and the gap engine is enabled. They update when a new trade opens and disappear when flat.
• Session background. This version does not add background shading for the session; session logic runs internally based on time.
• No on chart table. All decisions are visible through orders and exit levels. Use the Strategy Tester for performance metrics.
Inputs with guidance
Session Settings
• Trading session (sess). Session window in exchange time. Typical value uses the regular cash session for each contract, for example “0830-1530” for ES. Adjust if your broker or symbol uses different hours.
• Minutes before session end to force exit (flat_before_min). Minutes before the session end where positions are forced flat and the reference close is stored. Typical range is 15 to 120. Raising it closes trades earlier in the day; lowering it allows trades later in the session.
Gap Risk
• Enable gap based TP/SL (use_gap_risk). Master switch for the gap distance exit engine. Turning it off keeps entries and forced flat logic but removes automatic TP and SL placement.
• Use TP limit from gap (use_gap_tp). Enables gap based profit targets. Typical values are true for structured exits or false if you want to manage exits manually and only keep a stop.
• Use SL stop from gap (use_gap_sl). Enables gap based stop losses. This should normally remain true so that each trade has a defined initial risk in ticks.
• TP multiplier of gap distance (tp_mult). Multiplier applied to the gap distance for the target. Typical range is 0.5 to 2.0. Raising it places the target further away and reduces hit frequency.
• SL multiplier of gap distance (sl_mult). Multiplier applied to the gap distance for the stop. Typical range is 0.5 to 2.0. Raising it widens the stop and increases risk per trade; lowering it tightens the stop and may increase the number of small losses.
Exit Controls
• Exit with candle logic (use_candle_exit). If true, closes shorts on bullish candles and longs on bearish candles. Useful when you want to react to intraday reversal bars even if TP or SL have not been reached.
• Force flat before session end (use_forced_flat). If true, guarantees you are flat by the configured flat time and updates the reference close. Turn this off only if you understand the impact on overnight risk.
Filters
There is no separate trend or volatility filter in this version. All trades depend on the presence of a full gap bar inside the session. If you need extra filtering such as ATR, volume, or higher timeframe bias, they should be added explicitly and documented in your own fork.
Usage recipes
Intraday conservative gap fade
• Timeframe. Five minute chart on ES regular session.
• Gap risk. use_gap_risk = true, use_gap_tp = true, use_gap_sl = true.
• Multipliers. tp_mult around 0.7 to 1.0 and sl_mult around 1.0.
• Exits. use_candle_exit = false, use_forced_flat = true. Focus on the structured TP and SL around the gap.
Intraday aggressive gap fade
• Timeframe. Five minute chart.
• Gap risk. use_gap_risk = true, use_gap_tp = false, use_gap_sl = true.
• Multipliers. sl_mult around 0.7 to 1.0.
• Exits. use_candle_exit = true, use_forced_flat = true. Entries fade full gaps, stops are tight, and candle color flips flatten trades early.
Higher timeframe gap tests
• Timeframe. Fifteen minute or sixty minute charts on instruments with regular gaps.
• Gap risk. Keep use_gap_risk = true. Consider slightly higher sl_mult if gaps are structurally wider on the higher timeframe.
• Note. Expect fewer trades and be careful with sample size; multi year data is recommended.
Properties visible in this publication
• On average our risk for each position over the last 200 trades is 0.4% with a max intraday loss of 1.5% of the total equity in this case of 100k $ with 1 contract ES. For other assets, recalculations and customizations has to be applied.
• Initial capital. 100 000.
• Base currency. USD.
• Default order size method. Fixed with size 1 contract.
• Pyramiding. 0.
• Commission. Flat 2 USD per order in the Strategy Tester Properties. (2$ buying + 2$selling)
• Slippage. One tick in the Strategy Tester Properties.
• Process orders on close. ON.
Realism and responsible publication
• No performance claims are made. Past results do not guarantee future outcomes.
• Costs use a realistic flat commission and one tick of slippage per trade for ES class futures.
• Default sizing with one contract on a 100 000 reference account targets modest per trade risk. In practice, extreme slippage or gap through events can exceed this, so treat the one and a half percent risk target as a design goal, not a guarantee.
• All orders are simulated on standard candles. Shapes can move while a bar is forming and settle on bar close.
Honest limitations and failure modes
• Economic releases, thin liquidity, and limit conditions can break the assumptions behind the simple gap model and lead to slippage or skipped fills.
• Symbols with very frequent or very large gaps may require adjusted multipliers or alternative risk handling, especially in high volatility regimes.
• Very quiet periods without clean gaps will produce few or no trades. This is expected behavior, not a bug.
• Session windows follow the exchange time of the chart. Always confirm that the configured session matches the symbol.
• When both the stop and target lie inside the same bar’s range, the TradingView engine decides which is hit first based on its internal intrabar assumptions. Without bar magnifier, tie handling is approximate.
Legal
Education and research only. This strategy is not investment advice. You remain responsible for all trading decisions. Always test on historical data and in simulation with realistic costs before considering any live use.
Multi EMA + Golden Trio Crossover (Bullish & Bearish) by SKL📌 Multi EMA + Golden Trio Crossover (Bullish & Bearish) — by SKL
This indicator plots six key Exponential Moving Averages (EMA 5, 13, 26, 50, 100, 200) and highlights powerful momentum shift signals through the Golden Trio Crossover — a unique setup where EMA 5 crosses both EMA 13 and EMA 26 in the same candle .
It works for both bullish and bearish conditions, making it suitable for intraday, swing, and positional trading.
🔍 What is the Golden Trio Crossover?
A Golden Trio Crossover occurs when:
Bullish: EMA 5 crosses ** above ** EMA 13 *and* EMA 26 in the same candle
Bearish: EMA 5 crosses ** below ** EMA 13 *and* EMA 26 in the same candle
This triple-confirmation crossover often signals:
Early trend reversals
Strong continuation breakouts
Momentum shift points
📈 What This Indicator Includes
1. Six EMA Lines
EMA 5 – Blue
EMA 13 – Green
EMA 26 – Orange
EMA 50 – Black
EMA 100 – Gray
EMA 200 – Red
These EMAs help traders track trend direction, strength, and structure.
🌟 Visual Highlights
Green background → Bullish Golden Trio
Red background → Bearish Golden Trio
Label markers on each signal
“BULL GCO”
“BEAR GCO”
🔔 Alerts Included
You can enable alerts for:
Bullish Golden Trio Crossover
Bearish Golden Trio Crossover
Useful for breakout traders, scalpers, and swing traders.
🎯 How Traders Use This Indicator
Identify early trend shifts
Spot high-probability breakout candles
Confirm entries with multi-EMA confluence
Combine with volume, price action, or RSI for even stronger setups
📌 Notes
Works on all timeframes
Works on all asset classes (Stocks, Indices, Crypto, Forex, Commodities)
Fully automatic signal detection






















