Everything RSIThis indicator includes:
RSI Candles set to the default 14 length (un check Borders in the Style tab to see the candlesticks better)
I like using the wicks as an early warning for a possible trend change, which is generally in the opposite direction of the wicks.
It's also easier for me to draw trend lines using the RSI Candles vs the rsi plot line.
40 ema of the RSI Candles
2nd RSI set to the 20 length , which plots just inside the wicks of the RSI Candles. This RSI also highlights Oversold and Overbought levels.
I sometimes leave the RSI Candle Borders checked and use the 20 RSI plot with the wicks of the RSI Candles
Signals to look for Short or Long opportunities , which use the 5 sma of the RSI Candles crossing under the overbought and over the
oversold levels. If you'd like to plot the 5 sma, remove the // at the beginning of the code on line 72.
3nd RSI set to the default 14 length which can be set to a different timeframe as the current chart. Default setting is the 1h.
This RSI plots a + at the top of the indicator when it's above the 50 level and an x at the bottom of the indicator when it's below the 50 level.
For me, this is just a visual aid when I'm scalping on lower timeframes.
If the 1h RSI is above the 50 level, I focus on long scalps. If the 1h RSI is below the 50 level, I focus on short scalps.
RSI Cloud which is formed by filling in the area between the 14 ema of both the 7 RSI and 28 RSI.
I used part of @FnM_Capital 's Trend-Sniper script for my RSI Candles. Thank you! You're extremely talented and deserve all of the credit for your work.
I'd also like to thank @SeanNance for answering all of my random coding questions!!!
I've added the indicator to the example twice to show a couple of the ways I view the RSI's.
The top indicator shows the RSI Candle Borders "un checked" and without the 2nd RSI plot.
The bottom indicator shows RSI Candle Borders "checked", using 2nd RSI plot with the RSI Candle Wicks.
Cari skrip untuk "北证50+指数成分股"
CyclesThis is a modified Stochastic indicator. Modifications include:
1. The output is now centered on "0" and the scale is from -50 to +50, so that histograms and columns can be used to plot the output.
2. Added visual trade setup triggers. A trigger to the up side is a cycle high and indicates a "sell signal". A trigger to the down side is a cycle low and indicates a "buy" signal.
3. Added an alert trigger to be used to setup alerts. Selecting "Alert" to be Greater Than (>) Value = 0.00 will trigger an alert if either the buy or sell triggers occur.
4. Added a force indicator output. This indicates the rate of change in "D", or mathematically "dD/dt", as was done in the Power Analyzer indicator. When Force and D are in-phase, the maximum power is achieved.
5. Added "Slow Average Momentum" and "Slow Average Force" as was done in the Power Analyzer indicator.
6. Added an internal MACD and EMA as part of the trade setup trigger equation. There is a new input variable for the EMA length.
7. Added an input variable for the "Trigger Threshold", which ranges from -50 to 50, to be used as a screening filter.
BTC Volume Contango IndexBased on my previous script "BTC Contango Index" which was inspired by a Twitter post by Byzantine General:
This is a script that shows the contango between spot and futures volumes of Bitcoin to identify overbought and oversold conditions. When a market is in contango, the volume of a futures contract is higher than the spot volume. Conversely, when a market is in backwardation, the volume of the futures contract is lower than the spot volume.
The aggregate daily volumes on top exchanges are taken to obtain Total Spot Volume and Total Futures Volume. The script then plots (Total Futures Volume/Total Spot Volume) - 1 to illustrate the percent difference (contango) between spot and futures volumes of Bitcoin. This data by itself is useful, but because aggregate futures volumes are so much larger than spot volumes, no negative values are produced. To correct for this, the Z-score of contango is taken. The Z-score (z) of a data item x measures the distance (in standard deviations StdDev) and direction of the item from its mean (U):
Z-score = (x - U) / StDev
A value of zero indicates that the data item x is equal to the mean U, while positive or negative values show that the data item is above or below the mean (x Values of +2 and -2 show that the data item is two standard deviations above or below the chosen mean, respectively, and over 95.5% of all data items are contained within these two horizontal references). We substitute x with volume contango C, the mean U with simple moving average ( SMA ) of n periods (50), and StdDev with the standard deviation of closing contango for n periods (50), so the above formula becomes: Z-score = (C - SMA (50)) / StdDev(C,50).
When in contango, Bitcoin may be overbought.
When in backwardation, Bitcoin may be oversold.
The current bar calculation will always look incorrect due to TV plotting the Z-score before the bar closes.
Bank Nifty VolumeWhy this Script : Nifty 50 does not provide volume and some time it is really useful to understand the volume .
This is the pine script which calculate the nifty 50 volume .
Logic :
Take each stock contribute to nifty 50 and find it's volume .
Multiply the same with contribution percentage of the same on Nifty 50
Add up all of them and find the total volume .
I took the open source code from @daytraderph script called, Custom Volume
I will make sure I will update the contribution percentage of all stocks my self instead o you update using input methods. This is the difference. Some people don't know where to look at this to update the value, so for them this script might be useful. And this is the only difference comparing to Custom Volume script.
Probability: Bull/Bear Dominance | Ratio | Bar CountIntro
What's the probability of the next bar being red? How about green? Well, there are many ways to quantify the probability but I am presenting just one stupidly simple (but generally accurate) way to measure it.
Strangely... no one has done this before that I can find. I try to check if someone else has done it first (Pro Tip: Plz do this. We honestly don't need the 5 trillionth "MTF MAs" script.)
Indicator
Its a basic counting script, but the nice thing about this script is you choose the time range. It starts counting from a specified point of your choosing. It counts up the bull bars and bear bars separately.
Bull Bar = Close > Open
Bear Bar = Open > Close
You can look at them in sum or as a ratio of Green Bars : Red Bars
I know, it's almost too simple. But, here's some interesting food for thought from a layman to fellow laymen.
Analysis/Edge
Between the time of candle open and candle close, the price can do one of three things, close higher, close lower, or close equal to.
'Equal to' is rare on higher timeframes in liquid markets and it provides no useful information. Thus, we'll nix it for purposes of this conversation.
So boil it down. The next candle is going to be a red candle or a green candle.
It is popular to refer to the general probability of most candles as 50/50, with trader's mission in life being to seek an edge that tilts the probabilities slightly in their favor.
The truth is the odds are probably never actually 50/50, but knowing the precisely correct probability is unknowable, just like the accuracy of a weather forecast is inherently unknowable. What we're trying to do as traders is develop systems that give us predictive probabilistic outcomes that correspond with future realities based on various ways of measuring the market (most often heavily dependent on the past).
The reality is that the market can be measured in many, many different ways. The important thing is that you measure it in a way that is accurate, relevant, and universally applicable.
So look at this indicator here:
You start from a point in time on a chosen timeframe and you put red bars in the red column, green in the green column, and count them all up.
Then you make a ratio, in this case, Green : Red.
What the ratio shows you is the percentage of green bars compared to red bars . At the time of this screenshot, the 4h on the SPX starting from the 2020 bottom is showing a ratio of 1.2.
This means there have been 20% more green bars than there have been red bars.
Now there are 1,000 directions you can take this discussion. What is the overall volatility picture, the size of the red bars vs the green bars, what happens if you miss out on the 5 biggest green bars... so many more variables that you would need to take into account to develop a true edge from this idea. But, the bottom line fact (which is what I like about this) is that we can take this data and say with a certain level of confidence that on the SPX you have a 20% better shot at making money (otherwise stated there's a 60/40 chance) if you open a LONG trade at the beginning of a 4h candle than if you open a short.
That's useful information. One could argue that it's not a complete strategy in and of itself (although I bet it could be with a couple of additional parameters). But I can tell you, based on the 4h candles in the 2020 rally if you open a short, the deck is stacked against you from this perspective. And we can actually somewhat demonstrate this to be true for our dataset because we can look at the price history and see who likely made more money. The SPX is up 1000pts off the bottom. So, thus far, for this dataset, it rings true; Bulls have been doing way better in the latter part of 2020 than the bears.
Conclusion
Predictive systems with a small number of variables tend to be more robust than a system with many variables when applied to a complex system. I may keep updating this script if people like it and determine aspects like population vs sample size, confidence intervals, volatility, and exclusion of outliers. For now, this is just an opening foray into the basic idea of how we can establish an edge in the markets. It really can be this simple.
Thanks for Reading.
WR% VARIATIONThis indicator plot the change of the William R%.
We have 3 hlines, 50, 0, -50
You can use this as a confirmation indicator for different entries:
ENTRIES
When change is higher than 50 we have a strong LONG signal
When change is lower than -50 we have a strong SHORT signal
CONTINUATION TRADES
When we are in a Bull Market, candle is red and change crossover the 0 line, we have a LONG continuation trade
When we are in a Bear Market, candle is green and change crossunder the 0 line, we have a SHORT continuation trade
EXITS
When we are in a Bull Market, candle is green and change crossunder the 0 line, we have an Exit, or a Reversal
When we are in a Bear Market, candle is read and change crossover the 0 line, we have an Exit, or a Reversal
RISK-OFF.RISK.ON-ppxdf.v3======================================= RISK-OFF & RISK ON INDEX ================================================
1. Stock Price Momentum: Measuring the Standard & Poor's 500 Index ( S&P 500 ) versus its 125-day moving average (MA)
2. Stock Price Strength: Calculating the number of stocks hitting 52-week highs versus those hitting 52-week lows on the New York Stock Exchange (NYSE)
3. Stock Price Breadth: Analyzing trading volumes in rising stocks against declining stocks
4. Put and Call Options: How much do put options lag behind call options, signifying greed, or surpass them, indicating fear
5. Junk Bond Demand: Gauging appetite for higher risk strategies by measuring the spread between yields on investment-grade bonds and junk bonds
6. Market Volatility: CNN measures the Chicago Board Options Exchange Volatility Index ( VIX ), concentrating on a 50-day MA
7. Safe Haven Demand: The difference in returns for stocks versus treasuries
Each of these seven indicators is measured on a scale from 0 to 100, with the index being computed by taking an equal-weighted average of each of them.
A reading of 50 is deemed NEUTRAL.
Above 50 signals the market with RISK-ON. (GREED)
Below 50, Signals the market with RISK-OFF (FEAR)
8
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.
OVL_Kikoocycle Beta_Pine3This script use :
- A custom Chande Kroll Stop for generate the channel
- Some custom Parabolic S.A.R for generate cycles
This script can be separated into 3 categories:
- Channel Kroll generator : one layer for the actual interval and a layer for a Large Timeframe .(with ratio)
- "Range" generator : one layer for actual Interval and a layer for a Large Timeframe.(with automique ratio)
-Targets generator : one layer for actual interval with different trend.
"Channel Kroll" :
- I "hijack" the Chande Kroll Stop formula with custom parameters for generate this channel. Overall, it works like other types of channels like BB, etc... A midline and two borders. The thickness of the borders are relatively important here. A thick border shows some resistance of the area. And so the probability of seeing the market return to its first contact is stronger. While a very thin and vertical border would rather play the role of a breach, a bit like the idea of gaps. Often the market seems to want to go after several cycles.
You can activate its Large TimeFrame version, its midline is strong and fine borders helps to judge the risk.
SARget + "SAR Limited" :
- (S.A.R + targets) The philosophy of this function is simple... When a small cycle is broken, it creates a mark on a higher cycle. So on until the SAR called "SAR Limited". For simplicity, imagine a fractal image but inverted ... Break the small figure, it will mark the larger figure at this time but to get there you still have to make the way to the small figure.
Targets are : cross ("+") for fast targets(hidden by default because, theire work only on lower interval), squares (for medium trend), Xcross(for large trend) and red cross(they try to find a large contexte). When a target proc, it is for later (market need some cycles for going to, but it is relative to your interval). This gives you speculative goals.
Why 2 targets for a same type and a triangle with a 90deg angle : This give a potential area for management.The triangle help to visualize the SAR and to juge the market reaction. You need to adapte your trade with that...
Targets may be slightly too far because I am a bad coder... Currently the targets appear at the moment of rupture but it would be necessary to wait for the end of the breaking movement. Which can bring a positional error if the break is violent.
RnG and LTF RnG :
- Attempt to generate a Fibo range for each cycle and see interressing areas to enter or exit. This is played with the same philosophy as the Fibo extensions and retracement.
When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. As long as the market is out of the middle zone (the 3 lines) keep in mind the past RnG.
When the market is out of range, you can use the FibRetracement tool for have extensions. One point at each end, as on the presentation graph. (Values 1.14, 1.272, 1.414, 1.618, 1.786, 2, 2.4 and 4 work well.) If too extrem you can active the LTF version.
Never fomo a break, market like to pull a level... Observe and be patient.
It's easier to use than to explain xD
NB : Do not use the LTF as context. For this, it is better to look at a higher interval.
I invite you to look in the style tab of the script and deselect the plots named UNCHECKEME, this will ease your browser.
Amazing Crossover System - 100+ pips per day!I got the main concept for this system on another site. While I have made one important change, I must stress that the heart of this system was created by someone else! We must give credit where credit is due!
Y'all know baby pips. @ForexPhantom published about this system and did both back and forward test around 10 years ago.
I found it on the sit and now I put it to code to see how it performs. I assume 10 points spread for every trade. I use Renesource or AxiTrader to get the low spreads.
There are 2 mods, the single trades and constant trading on the direction.
Main concept
Indicators
5 EMA -- YELLOW
10 EMA -- RED
RSI (10 - Apply to Median Price: HL/2) -- One level at 50.
TIME FRAME
1 Hour Only (very important!)
PAIRS
Virtually any pair seems to work as this is strictly technical analysis.
I recommend sticking to the main currencies and avoiding cross currencies (just his preference).
WHEN TO ENTER A TRADE
Enter LONG when the Yellow EMA crosses the Red EMA from underneath.
RSI must be approaching 50 from the BOTTOM and cross 50 to warrant entry.
Enter SHORT when the Yellow EMA crosses the Red EMA from the top.
RSI must be approaching 50 from the TOP and cross 50 to warrant entry.
I've attached a picture which demonstrates all these conditions.
That's it!
f.bpcdn.co
MFIww MFI/RSI_v2[wozdux]A new version of the indicator Mfi_v2. Added new control parameters.
tt - the averaging period of the volume.
Len - the period for calculating the MPI.
nn-averaging period MFI (blue line). level-critical levels from below and above (black horizontal lines).
Level 0 or 50 - switch between different histogram views with the middle at either level 50 or level 0.
key level-key to remove black critical levels.
key ema (MFI, nn) - key to remove mfi averaging (blue line).
key color-key to remove histogram coloring.
key colomns a-line - key switching modes represent the mfi histrogram or line.
---------------------------
Новая версия индикатора MFIww_v2. Добавлены новые управляющие параметры.
tt- период усреднения объема.
Len - период вычисления MFI.
nn- период усреднения MFI (голубая линия).
level- критические уровни снизу и сверху (черные горизонтальные линии).
Level 0 or 50 - переключение между разными представлениями гистрограммы с серединой либо на уровне 50 , либо на уровне 0.
key level- ключ убрать черные критические уровни.
key ema(mfi,nn) - ключ убрать усреднение mfi (голубая линия).
key color- ключ убрать расцветку гистрограммы.
key colomns-line - ключ переключения режимов представления mfi гистрограммой или линией.
GoTiT|Simple Auto Fib v1.0Simple Auto Fib!
Notes:
1. Always set the trend manually! Don't rely on the auto trend detection.
2. The first parameter Length sets the number of candles back (left) to search for highs and lows from the current candle.
3. The High Offset parameter sets the number of candles back (left) to ignore/skip before searching for highs.
4. The Low Offset parameter sets the number of candles back (left) to ignore/skip before searching for lows.
5. The offset parameters change the behavior of the Length parameter.
Example 1:
Length = 100
High Offset = 0
Low Offset = 0
This is the default behavior, and the search for highs and lows occurs on the last 100 candles.
Example 2:
Length = 50
High Offset = 20 (Ignore the last 20 candles, and search for highs starting at candle 21 to 71 (or 50 candles back)
Low Offset = 15 (Ignore the last 15 candles, and search for lows starting at candle 16 to 66 (or 50 candles back)
In example 2, search starts on candle 21 for highs, and candle 16 for lows and extends 50 candles further back from there.
6. The Trend Detection parameter sets the number of candles back (left) to use in the trend calculations. Larger values give better "marco trend" detection. Smaller values give better "micro trend" detection. See note #1.
7. The white fib line is fib0. Assuming you correctly set the trend manually (or the trend is auto detected correctly), in a downtrend fib0 should be bellow the red fib line, and in an uptrend fib0 should be above the red fib line.
MACD + Stochastic + RSI (Long + Short)My strategy uses a combination of three indicators MACD Stochastic RSI .
The Idea is to GO LONG when ( MACD > Signal and RSI > 50 and Stochastic > 50) occures at the same time
and GO SHORT when ( MACD < Signal and RSI < 50 and Stochastic < 50)
This strategy works well on futures and stocks especially during market breaking up after consolidation
The best results are on Daily charts , so its NOT a scalping strategy. But it can work also on 1H charts.
The strategy does not have any stops and profit targets, so we can take all the market can give us at the moment.
The exit point only when MACD goes under/over Signal line
Its Preformance is quite stable.
So, use it, trade it.
If it will help you to imprive your trading results, please donate me
BTC: 12kd1F8buWisUBdq27BBwRkUvzW7Ey3og5
Trend Lines and MoreMulti-Indicator consisting of several useful indicators in a single package.
TREND LINES
-By default the 20 SMA and 50 SMA are shown.
-Use "MOVING AVERAGE TYPE" to select SMA, EMA, Double-EMA, Triple-EMA, or Hull.
-Use "50 MA TREND COLOR" to have the 50 turn green/red for uptrend/downtrend.
-Use "DAILY SOURCE ONLY" to always show daily averages regardless of timeframe.
-Use "SHOW LONG MA" to also include 100, 150, and 200 moving averages.
-Use "SHOW MARKERS" to show a small colored marker identifying which line is which.
OTHER INDICATORS
-You can show Bollinger Bands and Parabolic SAR.
-You can highlight key reversal times (9:50-10:10 and 14:40-15:00).
-You can show price offset markers, where was the price "n" periods ago.
That last one is useful to show the level of prices which are about to "fall off" the moving average
and be replaced with current price. So for example, if current price is significantly below the
200-days-ago price, you can gauge the difficulty for the 200 MA to start climbing again.
Multi SMA EMA WMA HMA BB (4x3 MAs Bollinger Bands) Pro MTF - RRBMulti SMA EMA WMA HMA 4x3 Moving Averages with Bollinger Bands Pro MTF by RagingRocketBull 2018
Version 1.0
This indicator shows multiple MAs of any type SMA EMA WMA HMA etc with BB and MTF support, can show MAs as dynamically moving levels.
There are 4 MA groups + 1 BB group. You can assign any type/timeframe combo to a group, for example:
- EMAs 50,100,200 x H1, H4, D1, W1 (4 TFs x 3 MAs x 1 type)
- EMAs 8,13,21,55,100,200 x M15, H1 (2 TFs x 6 MAs x 1 type)
- D1 EMAs and SMAs 12,26,50,100,200,400 (1 TF x 6 MAs x 2 types)
- H1 WMAs 7,77,231; H4 HMAs 50,100,200; D1 EMAs 144,169,233; W1 SMAs 50,100,200 (4 TFs x 3 MAs x 4 types)
- +1 extra MA type/timeframe for BB
compile time: 25-30 sec
full redraw time after parameter change in UI: 3 sec
There are several versions: Simple, MTF, Pro MTF, Advanced MTF and Ultimate MTF. This is the Pro MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +2 custom Timeframes for each group (2x5 MTF)
- Pro MTF: +4 custom Timeframes for each group (4x3 MTF), MA levels and show max bars back options
- Advanced MTF: +2 extra MAs/group (4x5 MTF), custom Ticker/Symbol, backreferences for type, TF and MA lengths in UI
- Ultimate MTF: +individual settings for each MA, custom Ticker/Symbols
Features:
- 4x3 = 12 MAs of any type including Hull Moving Average (HMA)
- 4x MTF groups with step line smoothing
- BB +1 extra TF/type for BB MAs
- 12 MA levels with adjustable group offsets, indents and shift
- show max bars back
- you can show/hide both groups of MAs/levels and individual MAs
Notes:
1. based on 3EmaBB, uses plot*, barssince and security functions
2. you can't set certain constants from input due to Pinescript limitations - change the code as needed, recompile and use as a private version
3. Levels = trackprice implementation
4. Show Max Bars Back = show_last implementation
5. uses timeframe textbox instead of input resolution to allow for 120 240 and other custom TFs. Also supports TFs in hours: 2H or H2
6. swma has a fixed length = 4, alma and linreg have additional offset and smoothing params
7. Smoothing is applied by default for visual aesthetics on MTF. To use exact ma mtf values (lines with stair stepping) - disable it
MTF Notes:
- uses simple timeframe textbox instead of input resolution dropdown to allow for 120, 240 and other custom TFs, also supports timeframes in H: 2H, H2
- Groups that are not assigned a Custom TF will use Current Timeframe (0).
- MTF will work for any MA type assigned to the group
- MTF works both ways: you can display a higher TF MA/BB on a lower TF or a lower TF MA/BB on a higher TF.
- MTF MA values are normally aligned at the boundary of their native timeframe. This produces stair stepping when a higher TF MA is viewed on a lower TF.
Therefore X Y Point Density/Smoothing is applied by default on MA MTF for visual aesthetics. Set both to 0 to disable and see exact ma mtf values (lines with stair stepping and original mtf alignment).
- Smoothing is disabled for BB MTF bands because fill doesn't work with smoothed MAs after duplicate values are replaced with na.
- MTF MA Value fluctuation is possible on the current bar due to default security lookahead
Smoothing:
- X,Y == 0 - X,Y smoothing disabled (stair stepping on high TFs)
- X == 0, Y > 0 - X,Y smoothing applied to all TFs
- Y == 0, X > 0 - X smoothing applied to all TFs < deltaX_max_tf, Y smoothing disabled
- X > 0, Y > 0 - Y smoothing applied to all TFs, then X smoothing applied to all TFs < deltaX_max_tf
X Smoothing with Y == 0 - shows only every deltaX-th point starting from the first bar.
X Smoothing with Y > 0 - shows only every deltaX-th point starting from the last shown Y point, essentially filling huge gaps remaining after Y Smoothing with points and preserving the curve's general shape
X Smoothing on high TFs with already scarce points produces weird curve shapes, it works best only on high density lower TFs
Y Smoothing reduces points on all TFs, removes adjacent points with prices within deltaY, while preserving the smaller curve details.
A combination of X,Y produces the most accurate smoothing. Higher delta value - larger range, more points removed.
Show Max Bars Back:
- can't set plot show_last from input -> implemented using a timenow based range check
- you can't delete/modify history once plotted, so essentially it just sets a start point for plotting (from num_bars bars back) that works only in realtime mode (not in replay)
Levels:
You can plot current MA value using plot trackprice=true or by checking Show Price Line in Style. Problem is:
- you can only change color (not the dashed line style, width), have both ma + price line (not just the line), and it's full screen wide
- you can't set plot trackprice from input => implemented using plotshape/plotchar with fixed text labels serving as levels
- there's no other way of creating a dynamic level: hline, plot, offset - nothing else works.
- you can't plot a text var - all text strings must be constants, so you can't change the style, width and text labels without recompiling.
- from input you can only adjust offset, indent and shift for each level group, and change color
- the dot below each level line is the exact MA value. If you want just the line swap plotshape with plotchar, recompile and save as your private version, adjust Y shift.
To speed up redraw times: reduce last_bars to ~2000, recompile and use as your own private version
Pinescript is a rudimentary language (should be called Painscript instead) that can basically only plot data. You can't do much else. Please see the code for tips and hints.
Certain things just can't be done or require shady workarounds and weeks of testing trying to resolve weird node.js compiler errors.
Feel free to learn from/reuse/change the code as needed and use as your own private version. See comments in code. Good Luck!
Simple_longshort_signalsLong Entry
Criteria:
1) Green candle close above 50MA
2) Green candle close above 20MA
3) MA of RSI(14) is cross upward 50
Result: displays green up arrow
Long Exit
Criteria:
1) Three red candles in a row
2) Any candle close bellow 20MA
3) MA of RSI(14) cross downward 50
Result: displays green diamond
Short Entry
1) Red candle close bellow 50MA
2) Red candle close bellow 20MA
3) MA of RSI(14) is cross downward 50
Result: displays red down arrow
Short Exit
Criteria
1) Three green candles in a row
2) Any candle close above 20MA
3) MA of RSI(14) is cross upward 50
Result: displays red diamond
Noro's Double RSI Strategy 1.0Strategy uses only 2 RSI indicators. Slow and fast.
If slow RSI > 50 and fast RSI < 50 - to open a long-position
If slow RSI < 50 and fast RSI > 50 - to open a short-position
If the long-position is open and a candle green - to close a long-position
if the short-position is open and a candle red - to close a short-position
GoldenCross by PuffyThis is a simple trading strategy that seeks the Golden Cross and Death Cross on the 4HR chart. The fast moving indicator in this strategy is the EMA 50 and the slow moving indicator is the EMA 200. When the EMA 50 crosses over the EMA 200 the strategy indicates a buy. When the EMA 50 crosses below the EMA 200 the strategy indicates a sell. This strategy averages trades in the 40 - 50 day range and as such should not be used with heavy leverage.
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
MTF EMAExponential Moving Average indicator that can be configured to display different timeframe EMA's.
Timeframe is set in minutes. Max timeframe currently is the daily (1440 minutes). Any value higher than 1440 will result in no plot.
Examples:
Daily 50 EMA plotted on 4H chart
4H 50 EMA and Daily 50 EMA plotted on 1H chart
Can also work in reverse if needed.
Example, Daily 50 EMA plotted on Weekly Chart
Price vs VolImproved version of OBV/price (this one actually works)
Both lines show where price is going relative to volume metrics (one line uses OBV, the other uses accumulation/distribution).
Green and above 50 means price is rising faster then buying volume
Red and below 50 means price is falling faster then selling volume
you can add smoothing in the controls and color will go according to raw (even if smoothing goes above/below 50)
under the hood: changes price, OBV and AD to RSI for comparability, calculates the difference between price and the others, then an RSI on the result to create an <50< style indicator.
this script replaces the previouse from:
ICT Fair Value Gap Detector [Eˣ]⚡ Fair Value Gap Detector
Overview
The Fair Value Gap Detector automatically identifies price imbalances on your charts - the inefficiencies left behind when price moves too quickly. This indicator reveals where price is likely to return for "rebalancing", based on ICT (Inner Circle Trader) concepts of market efficiency.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 What This Indicator Does
Detects Fair Value Gaps:
• 🟢 Bullish FVG - Gap left below during aggressive upward move
• 🔴 Bearish FVG - Gap left above during aggressive downward move
• Automatically identifies 3-candle price inefficiencies
• Works on all timeframes and instruments
Smart Fill Tracking:
• Full Fill - Price completely fills the gap
• 50% Fill - Price fills half the gap (critical level)
• Partial Fill - Price touches gap edge
• Real-time fill percentage tracking
• Auto-removes filled gaps (optional)
Professional Features:
• Active Gap Highlighting - Shows nearest unfilled gap
• Distance Calculator - Displays how far price is from gaps
• Market Bias - Analysis based on gap balance
• Size Filtering - Minimum gap size to avoid noise
• Visual Clarity - Clean boxes with color-coding
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 Understanding Fair Value Gaps
What Are Fair Value Gaps?
Fair Value Gaps (FVGs), also known as imbalances or inefficiencies, are zones where price moved so quickly that normal trading didn't occur. They represent:
• Price Imbalance - One-sided aggressive buying or selling
• Unfair Pricing - Some participants didn't get to trade at these levels
• Market Inefficiency - Supply/demand equilibrium was disrupted
• Rebalancing Zones - Price often returns to "fill" these gaps
The ICT Concept:
Markets constantly seek equilibrium (fair value). When price moves too fast:
1. It leaves gaps where normal trading didn't happen
2. These gaps represent unfair/inefficient pricing
3. Market has a tendency to return and "rebalance"
4. Smart money knows this and trades the fills
Why FVGs Work:
• Unfilled Orders - Traders who missed the move have pending orders in the gap
• Algorithmic Trading - Algos programmed to exploit inefficiencies
• Market Psychology - Traders notice gaps and place orders there
• Institutional Behavior - Smart money uses gaps for entries/exits
FVG vs Regular Gaps:
• Regular Gaps - Occur at market open, between daily closes
• Fair Value Gaps - Occur intraday, between 3 consecutive candles
• FVGs happen more frequently and on all timeframes
• FVGs are more tradeable for intraday/swing traders
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 Bullish Fair Value Gaps Explained
How They Form:
Bullish FVG requires 3 candles:
1. Candle 1 - Any candle (sets the high reference)
2. Candle 2 - Strong bullish candle (aggressive buying)
3. Candle 3 - Continuation candle
The Gap: Candle 3's LOW is above Candle 1's HIGH = Gap left unfilled
Visual Example:
```
Candle 3: Low at $105 ──────────┐
│ ← GAP (Bullish FVG)
Candle 2: Strong bullish │
│
Candle 1: High at $100 ──────────┘
```
What It Means:
• Price jumped from $100 to $105+ so fast, no trading occurred in between
• This $100-$105 zone is "unfair" - buyers/sellers didn't get to trade there
• Market may return to this zone to "rebalance"
• When price returns, it often acts as support
Trading Bullish FVGs:
Strategy:
• Wait for price to retrace down into the bullish FVG (green box)
• Look for rejection/bounce from the gap zone
• Enter long when price respects the FVG as support
• Stop loss: Below the FVG
• Target: Previous high or opposite FVG
Best Entry Points:
• 50% Fill: Price enters middle of gap (highest probability)
• Full Fill: Price touches bottom of gap (aggressive entry)
• Tap & Reject: Price quickly enters and exits gap (strong signal)
Example Trade:
• Bullish FVG forms: $50,000 - $50,500 (500 point gap)
• Price rallies to $52,000 then retraces
• Price drops to $50,250 (50% of gap filled)
• Bullish reversal candle appears
• Enter long at $50,500, stop at $49,800
• Target: $52,000+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 Bearish Fair Value Gaps Explained
How They Form:
Bearish FVG requires 3 candles:
1. Candle 1 - Any candle (sets the low reference)
2. Candle 2 - Strong bearish candle (aggressive selling)
3. Candle 3 - Continuation candle
The Gap: Candle 3's HIGH is below Candle 1's LOW = Gap left unfilled
Visual Example:
```
Candle 1: Low at $100 ───────────┐
│ ← GAP (Bearish FVG)
Candle 2: Strong bearish │
│
Candle 3: High at $95 ───────────┘
```
What It Means:
• Price dropped from $100 to $95 so fast, no trading occurred in between
• This $95-$100 zone is "unfair" - buyers/sellers didn't get to trade there
• Market may return to this zone to "rebalance"
• When price returns, it often acts as resistance
Trading Bearish FVGs:
Strategy:
• Wait for price to retrace up into the bearish FVG (red box)
• Look for rejection/reversal from the gap zone
• Enter short when price respects the FVG as resistance
• Stop loss: Above the FVG
• Target: Previous low or opposite FVG
Best Entry Points:
• 50% Fill: Price enters middle of gap (highest probability)
• Full Fill: Price touches top of gap (aggressive entry)
• Tap & Reject: Price quickly enters and exits gap (strong signal)
Example Trade:
• Bearish FVG forms: $48,000 - $48,500 (500 point gap)
• Price drops to $46,000 then retraces
• Price rallies to $48,250 (50% of gap filled)
• Bearish reversal candle appears
• Enter short at $48,000, stop at $48,700
• Target: $46,000-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 How To Use This Indicator
Strategy 1: FVG Rebalancing (Classic)
Best For: Swing trading, reversal trading
Timeframes: 15min, 1H, 4H
Win Rate: 65-75%
Entry Rules:
1. Identify unfilled FVG (bright color, not gray)
2. Wait for price to return to the gap
3. Best entry: 50% fill of the gap
4. Look for reversal confirmation:
• Bullish FVG: Pin bar, engulfing, hammer
• Bearish FVG: Shooting star, bearish engulfing
5. Enter when price bounces/rejects from FVG
6. Stop: Beyond opposite side of FVG
7. Target: 2-3R or previous high/low
Why It Works: 70%+ of FVGs get filled, and 60%+ show reaction
Strategy 2: FVG + Order Block Confluence
Best For: High-probability setups
Timeframes: 1H, 4H
Win Rate: 75-85%
Entry Rules:
1. Find FVG that overlaps with Order Block
2. This creates a "super zone" of confluence
3. Wait for price to return to this zone
4. Enter on first touch of confluence zone
5. Stop: Beyond the confluence zone
6. Target: 3-4R
Why It Works: Double institutional concepts = highest probability
Strategy 3: Multi-Timeframe FVG
Best For: Position trading, major moves
Timeframes: Combine Daily + 4H or 4H + 1H
Win Rate: 70-80%
Entry Rules:
1. Identify large FVG on higher timeframe (Daily/4H)
2. Wait for price to enter this HTF FVG
3. Switch to lower timeframe (4H/1H)
4. Look for LTF FVG within HTF FVG in same direction
5. Trade the LTF FVG fill
6. Stop: Below LTF FVG
7. Target: Exit HTF FVG or beyond
Why It Works: Timeframe alignment = institutional consensus
Strategy 4: FVG Rejection Trade
Best For: Quick scalps, day trading
Timeframes: 5min, 15min
Win Rate: 60-70%
Entry Rules:
1. Price enters FVG zone
2. Immediate rejection (strong reversal candle)
3. Enter on close of rejection candle
4. Tight stop beyond FVG
5. Quick target: 1-2R
Why It Works: Strong rejection = institutional defense of level
Strategy 5: FVG-to-FVG Trading
Best For: Momentum trading
Timeframes: 15min, 1H
Win Rate: 55-65%
Entry Rules:
1. Identify bullish FVG below and bearish FVG above
2. Enter long at bullish FVG, target bearish FVG
3. Or enter short at bearish FVG, target bullish FVG
4. Price often moves from one imbalance to another
5. Stop: Beyond trading FVG
6. Target: Opposite FVG
Why It Works: Price rebalances from one inefficiency to another
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Settings Explained
Display Settings
Show Bullish/Bearish FVG
• Toggle each type on/off independently
• Customize colors for each FVG type
• Default: Green (bullish), Red (bearish)
• Tip: Use colors that contrast with your chart
Max FVG to Display (Default: 20)
• Limits how many gaps are shown at once
• Lower (10-15): Cleaner chart, recent gaps only
• Higher (30-50): More historical context
• Recommended: 15-25 for most trading
Show FVG Labels (Default: ON)
• Displays "FVG+" and "FVG-" text on gaps
• Shows 🎯 on active (nearest) gap
• Shows fill percentage (e.g., "FVG+ 35%")
• Turn OFF for minimal appearance
• Recommended: Keep ON for clarity
Extend Gaps (bars) (Default: 50)
• How far to extend gap boxes to the right
• Lower (20-30): Shorter boxes
• Higher (100+): Longer boxes, easier to see
• Gaps auto-extend until filled or limit reached
• Recommended: 40-60 bars
Filters
Min Gap Size % (Default: 0.05)
• Minimum gap size as percentage of price
• Filters out tiny, insignificant gaps
• Crypto: 0.05-0.15% (high volatility)
• Forex: 0.03-0.10% (moderate volatility)
• Stocks: 0.05-0.20% (varies by stock)
• Indices: 0.05-0.15%
• Adjust based on instrument's average move
Show Filled Gaps (Default: OFF)
• When ON: Shows gray boxes for filled gaps
• When OFF: Gaps disappear after mitigation
• Use ON: For learning and backtesting
• Use OFF: For clean, active trading view
Advanced Settings
Auto-Detect Mitigation (Default: ON)
• Automatically tracks when gaps are filled
• Updates fill percentage in real-time
• Marks gaps as "mitigated" when filled
• Recommended: Keep ON
Mitigation Type (Default: Full)
• Full: Gap considered filled when price closes through entire gap
• 50%: Gap considered filled at 50% (critical level)
• Partial: Gap considered filled on first touch
• For learning: Use "Full"
• For aggressive trading: Use "50%"
• For conservative trading: Use "Partial"
Highlight Nearest Gap (Default: ON)
• Highlights the closest unfilled gap to current price
• Active gap shown with 🎯 emoji and brighter color
• Helps focus on most relevant opportunity
• Recommended: Keep ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📱 Info Panel Guide
Bullish FVG Count
• Number of active (unfilled) bullish fair value gaps
• Higher number = More potential support zones below
• Multiple bullish FVGs = Strong rebalancing demand
Bearish FVG Count
• Number of active (unfilled) bearish fair value gaps
• Higher number = More potential resistance zones above
• Multiple bearish FVGs = Strong rebalancing supply
Bias Indicator
• ⬆ Bullish: More bullish FVGs than bearish
• ⬇ Bearish: More bearish FVGs than bullish
• ↔ Neutral: Equal FVGs on both sides
• Market tends to fill nearby gaps first
Target Indicator
• Shows nearest unfilled gap and distance
• Example: "Bull FVG -1.25%" = Bullish gap is 1.25% below price
• Example: "Bear FVG +0.85%" = Bearish gap is 0.85% above price
• Watch for price to reach these targets
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📱 Alert Setup
This indicator includes 4 alert types:
1. Price Entering Bullish FVG
• Fires when price drops into a bullish gap
• Action: Watch for bounce/reversal
• High-probability long setup developing
2. Price Entering Bearish FVG
• Fires when price rallies into a bearish gap
• Action: Watch for rejection/reversal
• High-probability short setup developing
3. New Bullish FVG Detected
• Fires when a new bullish gap forms
• Action: Mark zone for future fill
• New rebalancing target below identified
4. New Bearish FVG Detected
• Fires when a new bearish gap forms
• Action: Mark zone for future fill
• New rebalancing target above identified
To Set Up Alerts:
1. Click "Alert" button (clock icon)
2. Select "Fair Value Gap Detector"
3. Choose your alert condition
4. Configure notification method
5. Click "Create"
Pro Tip: Set "Price Entering" alerts to catch fills in real-time
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 Pro Tips & Best Practices
✅ DO:
• Wait for 50% fill - Middle of gap has highest win rate (65-70%)
• Use confirmation - Don't trade just because price touched gap
• Combine with structure - FVG + support/resistance = high probability
• Trade first fill - Unfilled gaps have better success rate than refilled
• Respect full fills - Once fully filled, gap is less reliable
• Use multiple timeframes - HTF FVGs are stronger than LTF
• Check session timing - FVGs work best during London/NY sessions
• Follow the bias - More bullish FVGs = favor longs
⚠️ DON'T:
• Don't blindly fade gaps - Wait for price action confirmation
• Don't ignore momentum - Strong trends can blow through FVGs
• Don't trade every gap - Quality over quantity
• Don't assume all gaps fill - About 70-80% fill, 20-30% don't
• Don't use tight stops - Allow room for wick into gap
• Don't overtrade - Wait for confluence and confirmation
• Don't fight trends - Best FVG trades are with higher TF trend
• Don't ignore fill percentage - 50% is often the sweet spot
🎯 Best Timeframes:
• Scalpers: 1min, 5min (many gaps, quick fills)
• Day Traders: 5min, 15min, 1H (balanced)
• Swing Traders: 1H, 4H, Daily (larger, more reliable gaps)
• Position Traders: 4H, Daily, Weekly (major imbalances)
🔥 Best Instruments:
• Excellent: BTC, ETH, ES, NQ, Forex majors (clean price action)
• Good: Gold, Oil, Major indices, Large-cap stocks
• Moderate: Altcoins, small-cap stocks (more noise)
• Best Markets: Trending markets with clear swings
⏰ Best Times for FVG Trading:
• London Session: High volume = reliable gap fills
• NY Session: Strong moves create quality gaps
• London-NY Overlap: Best time for gap creation and fills
• Asian Session: Lower probability, wait for London
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎓 Advanced FVG Concepts
FVG Mitigation Levels
Understanding fill percentages:
• 0-25% Fill: Gap barely touched, often continues without fill
• 25-50% Fill: Partial rebalancing, may reverse here
• 50% Fill: CRITICAL LEVEL - Highest probability reversal zone
• 50-75% Fill: Deep rebalancing, strong reversal likely
• 75-100% Fill: Full rebalancing, gap's purpose fulfilled
Why 50% Matters: Market seeks equilibrium, and 50% represents perfect balance
FVG Inversions
When price breaks through a gap completely:
• Bullish FVG that's broken becomes bearish (support → resistance)
• Bearish FVG that's broken becomes bullish (resistance → support)
• Inverted gaps are weaker than fresh gaps
• Trading: Can fade the inverted gap but with caution
FVG Confluence Zones
Multiple FVGs at similar level:
• Creates "super gap" or confluence zone
• Much higher probability of reaction
• Wider zone for entries (more room for stops)
• Often aligns with other institutional concepts
FVG + Order Block Combo
When FVG overlaps with Order Block:
• Double institutional concept
• Extremely high probability setup (75-85% win rate)
• Price drawn to fill gap AND test order block
• Use tight stops, generous targets (3-5R possible)
Nested FVGs (Multi-Timeframe)
Small FVG inside larger FVG:
• Daily FVG contains 4H FVG contains 1H FVG
• Trade the smallest FVG in direction of larger ones
• Highest probability when all aligned
• Progressive targets: Fill small → medium → large gaps
FVG Exhaustion
When price creates multiple FVGs in same direction:
• Indicates strong momentum/impulsive move
• Each gap represents acceleration
• Last gap often signals exhaustion
• Watch for reversal after filling final gap
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Common FVG Patterns
Pattern 1: The Perfect Rebalance
• FVG forms during strong move
• Price continues 100+ pips
• Clean return to 50% of gap
• Immediate reversal
• Textbook setup, 70%+ win rate
Pattern 2: The Double Fill
• Price partially fills gap (25%)
• Weak reaction, continues
• Returns again for deeper fill (75%)
• Strong reversal on second fill
• Second fill often better entry
Pattern 3: The Blow-Through
• Price approaches gap
• Completely ignores it, no reaction
• Keeps going in same direction
• Sign of very strong momentum
Pattern 4: The Magnet Effect
• Price slowly grinds toward gap
• Accelerates as it gets close
• Quickly fills and reverses
• Common in ranging markets
Pattern 5: The False Fill
• Price wicks into gap briefly
• Immediately reverses without filling
• "Stop hunt" or liquidity grab
• Gap remains unfilled
• Often precedes strong move
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 What Makes This Different?
Unlike basic gap indicators, Fair Value Gap Detector:
• ICT Methodology - Based on proven institutional concepts
• Real-Time Fill Tracking - Shows percentage filled as it happens
• 3 Mitigation Types - Full, 50%, Partial for different strategies
• Active Gap Highlighting - Shows most relevant opportunity
• Smart Filtering - Minimum size to avoid noise
• Visual Clarity - Clean, professional appearance
• Auto-Management - Removes filled gaps automatically
• Distance Tracking - Know exactly where price needs to go
Based On Professional Concepts:
• ICT Fair Value Gap theory
• Market efficiency principles
• Price rebalancing dynamics
• Institutional order flow analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 FVG Statistics & Probabilities
Based on ICT concepts and trader observations:
Gap Fill Rates:
• 70-80% of FVGs get filled eventually
• 60-70% show some reaction when filled
• 50% fill level has ~65% reversal rate
• Full fills have ~55% reversal rate
Timeframe Reliability:
• Daily FVGs: ~75-85% fill rate, strongest reactions
• 4H FVGs: ~70-80% fill rate, strong reactions
• 1H FVGs: ~65-75% fill rate, good reactions
• 15min FVGs: ~60-70% fill rate, moderate reactions
• 5min FVGs: ~55-65% fill rate, weaker reactions
Best Practices:
• First touch of gap = 65-70% win rate
• 50% fill = 65% win rate
• FVG + Order Block = 75-85% win rate
• Multi-timeframe aligned FVG = 70-80% win rate
• FVG in trending market = 60-70% win rate
Common Failures:
• Strong momentum blows through gaps (20-30% of time)
• Gaps in low-volume periods less reliable
• Very small gaps (<0.05%) often ignored
• Counter-trend gaps have lower success rate
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🙏 If You Find This Helpful
• ⭐ Leave your feedback
• 💬 Share your experience in the comments
• 🔔 Follow for updates and new tools
Questions about Fair Value Gaps? Feel free to ask in the comments.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version History
• v1.0 - Initial release with 3-candle FVG detection and real-time fill tracking
Cold Brew Ranges🧭 Core Logic and Calculation
The fundamental logic for each range (OR and CR) is identical:
Time Definition: Each range is defined by a specific Start Time and a fixed 30-second duration. The timestamp function, using the "America/New_York" time zone, is used to calculate the exact start time in Unix milliseconds for the current day.
Example: t0200 = timestamp(TZ, yC, mC, dC, 2, 0, 0) sets the start time for the 02:00 OR to 2:00:00 AM NY time.
Range Data Collection: The indicator uses the request.security_lower_tf() function to collect the High (hArr) and Low (lArr) prices of all bars that fall within the defined 30-second window, using a user-specified, sub-chart-timeframe (openrangetime, defaulted to "1" second, "30S", or "5" minutes). This ensures high precision in capturing the exact high and low during the 30-second window.
High/Low Determination: It iteratively finds the absolute highest price (OR_high) and the absolute lowest price (OR_low) recorded by the bars during that 30-second window.
Range Locking: Once the current chart bar's time (lastTs) passes the 30-second End Time (tEnd), the High and Low are locked (OR_locked = true), meaning the range calculation is complete for the day.
Drawing: Upon locking, the range is drawn on the chart using line.new for the High, Low, and Equilibrium, and box.new for the shaded fill. The lines are extended to a subsequent time anchor point (e.g., the 02:00 OR is extended to 08:20, the 09:30 OR is extended to 16:00).
Equilibrium (EQ): This is calculated as the simple average (midpoint) of the High and Low of the range.
EQ=
2
OR_High+OR_Low
⏰ Defined Trading Ranges
The indicator defines and tracks the following specific 30-second ranges:
Range Name Type Start Time (NY) Line Extension End Time (NY) Common Market Context
02:00 OR Opening 02:00:00 08:20:00 Asian/European Market Overlap
08:20 OR Opening 08:20:00 16:00:00 Pre-New York Open
09:30 OR Opening 09:30:00 16:00:00 New York Stock Exchange Open (Most significant OR)
18:00 OR Opening 18:00:00 20:00:00 Futures Market Open (Sunday/Monday)
20:00 OR Opening 20:00:00 Next Day's session start Asian Session Start
15:50 CR Closing 15:50:00 20:00:00 New York Close Range
⚙️ Key User Inputs and Customization
The script offers extensive control over which ranges are displayed and how they are visualized:
Range Time & History
openrangetime: Sets the sub-timeframe (e.g., "1" for 1 second) used to calculate the precise High/Low of the 30-second range. Crucial for accuracy.
showHistory: A toggle to show the ranges from previous days (up to a histCap of 50 days).
Range Toggles and Styling
On/Off Toggles: Independent input.bool (e.g., OR_0200_on) to enable or disable the display of each individual range.
Colors & Width: Separate color and width inputs for the High/Low lines (hlC), the Equilibrium line (eqC), and the background fill (fillC) for each range.
Line Styles: Global inputs for the line styles of High/Low (lineStyleInput) and Equilibrium (eqLineStyleInput) lines (Solid, Dotted, or Dashed).
showFill: Global toggle to enable the shaded background box that highlights the area between the High and Low.
Extensions
The script calculates and plots extensions (multiples of the initial range) above the High and below the Low.
showExt: Toggles the visibility of the extension lines.
useRangeMultiples: If true, the step size for each extension level is equal to the initial range size:
Step=Range=OR_High−OR_Low
If false, the step size is a fixed value defined by stepPts (e.g., 60.0 points, which is a common value for NQ futures).
stepCnt: Determines how many extension levels (multiples) are drawn above and below the range (default is 10).
📈 Trading Strategy Implications
The Cold Brew Ranges indicator is a tool for session-based support and resistance and range breakout/reversal strategies.
Key Support/Resistance: The High and Low of these defined opening ranges often act as strong, predefined price levels. Traders look for price rejection off these boundaries or a breakout with conviction.
Equilibrium (Midpoint): The EQ often represents a fair value for that specific session's opening. Movements away from it are seen as opportunities, and a return to it is common.
Extensions: The range extensions serve as potential profit targets or stronger, layered support/resistance levels if the market trends aggressively after the opening range is set.
The core idea is that the activity in the first 30 seconds of a significant trading session (like the NYSE or a market session open) sets a bias and initial boundary for the trading period that follows.






















