Fair Value Strategy UltimateThis is a strategy using an index's (SPX, NDX, RUT) Fair Value derived from Net Liquidity.
Net Liquidity function is simply: Fed Balance Sheet - Treasury General Account - Reverse Repo Balance
Formula for calculating the fair value of and Index using Net Liquidity looks like this: net_liquidity/1000000000/scalar - subtractor
The Index Fair Value is then subtracted from the Index value which creates an oscillating diff value.
When diff is greater than the overbought threshold, Index is considered overbought and we go short/sell.
When diff is less than the oversold signal, Index is considered oversold and we cover/buy.
The net liquidity values I calculate outside of TradingView. If you'd like the strategy to work for future dates, you'll need to update the reference to my NetLiquidityLibrary , which I update daily.
Parameters:
Index: SPX, NDX, RUT
Strategy: Short Only, Long Only, Long/Short
Inverse (bool): check if using an inverse ETF to go long instead of short.
Scalar (float)
Subtractor (int)
Overbought Threshold (int)
Oversold Threshold (int)
Start After Date: When the strategy should start trading
Close Date: Day to close open trades. I just like it to get complete results rather than the strategy ending with open trades.
Optimal Parameters:
I've optimized the parameters for each index using the python backtesting library and they are as follows =>
SPX
Scalar: 1.1
Subtractor: 1425
OB Threshold: 0
OS Threshold: -175
NDX
Scalar: 0.5
Subtractor: 250
OB Threshold: 0
OS Threshold: -25
RUT
Scalar: 3.2
Subtractor: 50
OB Threshold: 25
OS Threshold: -25
Cerca negli script per "daily"
Kalman Gain Parameter MechanicsFrequently asked question is to explain how Gain parameter works in kalman funtion. This script serves as a visual representation of Gain parameter of Kalman function used in HMA-Kalman & Trendlines script. (The function creator's name was misspeled in that script as Kahlman)
To see better results set your Chart's timeframe to Daily.
Heikin Ashi Smoothed Buy Sell (Sunseeder) I like to use it on the daily. This helps with indicating buy signals on the DXY, BITCOIN and ETH charts. You're able to customize the colors of the buy signals etc. Enjoy!
Three Golden By Moonalert =========================
English
=========================
Three Golden By Moonalert
(Green Bar) BUY = All three conditions are agree uptrend.
1 candlestick is on the middle line of Bollinger Bands
2 RSI is more than 50
3 MACD cross up Zero Line
(Red Bar) SELL = All three conditions are agree downtrend
1 candlestick is under the middle line of Bollinger Bands
2 RSI is less than 50
3 MACD cross down Zero Line
(Yello Bar) Wait and see = some candition are agree uptrend or downtrend
Basic logic is
Green = Buy
Red = Sell
Yello = wait and see
Working Good for TF Daily.
=========================
THAI
=========================
เขียว = ซื้อ ( Bollinger bands , Rsi , Macd บอกขึ้นทั้งหมด )
เเดง = ขาย ( Bollinger bands , Rsi , Macd บอกลงทั้งหมด )
เหลือง = นั่งนิ่งๆ ( Bollinger bands , Rsi , Macd บอกขั้นหรือลงบางตัว )
สามารถปรับMACD ระหว่าง
Cross Signal กับ Cross Zeroได้ เเนะนำอย่างหลัง
สามารถปรับ EMA 20 50 200 เปิดปิดได้ที่ตั้งค่า
Multi-timeframe MAs + Stoch RSI SignalsHello traders,
I welcome you to my first published script on TradingView: “Multi-timeframe Moving Averages + Stochastic RSI”.
The script is based on a simple formula: Buy signals are generated when a fast moving average is above a slower moving average (uptrend) and the Stochastic RSI K line is crossing above the oversold level (entry).
Sell signals are generated when a fast moving average is below a slower moving average (downtrend) and the Stochastic RSI K line is crossing below the overbought level (entry).
This indicator works best in strong trends!
**Please note the above example has repainting turned on which may produce unrealistic results when viewing historical data. See below for more information regarding this and how you can turn it off.**
The user has the following inputs:
- Option to change the Stochastic RSI settings, including the oversold and overbought levels.
- Option to enter any value for both the Fast Moving Average and the Slow Moving Average.
- Option to change between EMA or SMA for each moving average.
- Multiple time frames to choose from, as well as the ability to selectively turn off individual time frames (both plots and alerts).
(Default time frames are 1 hour, 4 hour, and Daily. You can have a 4th time frame by changing your current time frame to something lower than the other 3 time frames)
- Turn on/off repainting: If repainting is turned on you will get an alert and buy/sell signal on chart immediately when condition is met, however the signal may disappear from chart if the condition reverses during the same candle.
If repainting is turned off, the indicator will wait for the candle to close before issuing the alert and painting the signal on chart.
For higher time frames, the indicator will wait for the candle in the higher time frame to close before issuing a signal if repaint is turned off. Default is set to Repaint on, so please be aware of this if you do not want repainting.
How to use alerts:
- Before you do anything, make sure your current time frame is the lowest time frame you’d like alerts on, as you will still receive alerts for the higher time frames you selected in settings.
- Once you have all the settings changed to how you like, save your chart first. Then right click on any of the indicator’s buy/sell signals on the chart and click “Add Alert on MAs + Stoch RSI”.
- Make sure “Any alert() function call” is selected under the Condition.
- You can delete or change the text in “Alert name” if you want as the alert message is already built into the indicator, and it will tell you in the alert message which asset and time frame to buy or sell.
Other things to note:
- The indicator will not display the buy/sell signals of lower time frames when you are on a higher time frame. This was done purposely to reduce clutter on the chart when you switch to higher time frames.
- While the alert message will tell you which time frame a signal was generated, the plots on the chart will instead show “Buy/Sell TF1, or TF2, or TF3”.
If the signal is from the current time frame that the alert was created on, then it will simply show “Buy” or “Sell”.
Hope you guys enjoy using this one, please drop a like if you found it useful. If anyone wants to modify my script in any way, please just credit me for the original work when you publish the script. Good luck!
Momentum Performance This Indicator displays the momentum (performance) of the symbol in percent.
You can compare the performance with other symbols.
The default benchmarks are the S&P 500, the MSCI World and the FTSE All World EX US.
The default length corresponds to one year in the timeframes monthly, weekly and daily.
In intraday the default length is 200, but you can also set your own setting.
You have also the opportunity to display a average momentum performance of the main symbol.
Webby's RSI (Really Simple Indicator)Webby's RSI (Really Simple Indicator) is a technical indicator designed to gauge the health of an uptrend. The concept and original implementation was created by Mike Webster, previously a portfolio manager for William O'Neil, founder of Investor's Business Daily.
Most often used with the Nasdaq Composite (IXIC), Webby's RSI is the percentage of the low versus the 21-day moving average. At the beginning of a bull market, the higher the value, the better, as we want to see power.
Using the zones shown on the chart:
0.5% and 2.0% - Ideal
2.0% to 4.0% - Caution
4.0%+ - Warning
Trading With Colors7 hours ago
Hello friends. This is simply a moving average ribbon, per se. The values for the colored ribbon can have their length calculated to fit their chosen resolution on the current one. This solved problems for me, but it was my own solution. Maybe I'll learn something new from sharing this.
To everybody else who is learning as well, this script essentially serves to introduce other time-frame moving averages. This intends to helps traders find the scope of relevance and not get lost in the current time-frame.
Besides the colored moving averages (2 sets, different resolutions, great zoomed in our out), I included optional check-boxes to allow comparison of sets of moving averages at will, so that the most important to the individual trader can be compared and selected specifically.
I kept the default options set to keep it clean. It likely won't be the only indicator on one's chart, so it's naturally best to reduce indicator noise from one, as to not subtract from the benefit of the other indicators.
I integrated tons of acquired knowledge into this, so I hope somebody finds a missing piece to their collection or a solution to a coding problem within. I also hope this provides a new insight and helps others on their path to financial freedom.
Best wishes.
PS: I left some old code in comments in case it helps to understand the evolution of my code. I'll update this again once it works on the Daily. You might figure it out before I do, in wish case, do share :)
Linear Regression Pearson's R - Trend Channel StrategyThis script takes advantage of the Pearson's R attribute of the data set you provide.
Pearson's R attempts to find how correlated data is with a potential pattern. If the number is negative the correlation is upwards . If it's positive the correlation is downwards . Pearson's R can only be a number between -1 and 1. It should be impossible to ever reach -1 or 1 as that would be a perfect correlation.
This particular strategy involves using linear regression and Pearson's R to keep recalculating steps back from the current position until the Pearson's R reaches the desired amount. For example, in my experience I have found that 0.85 for as a buy point is very good as it means the trend is very reliable and solid. When the market tends to be bullish it tends to do so longer then when it's bearish.
Likewise when a downtrend is more real, I found that 0.71 for the negative Pearson's R value is ideal and gives the best results.
These can all be changed in the settings section (with the gear icon) next to when you set your results.
This strategy is really fun/useful to watch if you have the replay bar mode enabled for TradingView. This script supports this and all you have to do is go into the settings and enable realtime mode . Doing this you can actually see the trend lines change in realtime and comes in very handy for seeing long term reversals as you will see the Pearson's R value start to go down or up indicating the path it's going on.
WARNING: This script is very intensive on the processing power of your machine. If you find that it's to slow you may have to go into the settings of the script and adjust the 'step by' parameter so that it calculates a little faster. It won't be as accurate but it will be good enough. I feel I've optimized it with it's current setting as an example of what you want to aim for.
If there are any questions do no hesitate to message or ask me. I love feedback on the community for new features and ideas!
This works best with with XBTUSD on the 4 hourly chart . It does not seem to work well if you go below hourly or go above daily.
GBTC/BTC MACDGBTC created BTC's leading indicator theory.
GBTC / BTC (market capitalization) MACD is calculated.
It seems to be good to see more than daily.
GBTCはBTCの先行指標説を信じて作成しました。
GBTC/BTC(時価総額)のMACDを計算しています。
日足以上で見るのが良いと思われます。
ft.se.zero_crossingTurns zero crossings into a simple long/short signal (-1,0,1). Can be added to any suitable third party indicator. Example shows how the extractor can be used to analyse the performance of WolfPack ID on the daily.
Note: this script is part of FalkorTools, a suite of composable tools to build and analyse strategies on trading view.
Traded Range & True ATRBlack line = Trade Range from the last X periods.
Red Line = 61.8% of black line value.
Green bar = The current trade period range.
Default Value = 21 (21 days = I business month)
Generally speaking, a stock moves approximately the same value daily. Knowing the approximate value it likes to stay within calms the nerves when you see retracement of price occuring.
IE. Price average = 1.00 in a day. It move .75 within first hour then retraces in the opposite direction. There are still hours left in the trade day, so it is trading in its value range in order to not over extend itself.
This differs in calculation from the Wells Wilder version as it smooths out jumps and only examines the ranges between high and low.
A good rule of thumb is.
Stop Loss = Entry Price +/- (ATR * 1.5)
Take Profit = (1) Entry Price +/- ATR - 50% exit (Set Trailing Stop @ Entry Value), (2) Entry Price +/- ATR * 2 (50% of remaining).
Parabolic SAR Strategy w/ EMA AlertsLong green arrow.
Short red arrow.
White bars = no trade zone.
Updating trailing stop daily.
Bitcoin Stock to Flow Multiple (fixed)This is a fixed version of the original script by yomofoV:
I fixed the variable assignments and added switching of timeframes over indicator inputs.
To switch timeframes click on the indicator, open its settings and switch the timeframe to either monthly, weekly or daily.
Multi Timeframe EMAs (Fib@MWD)plot fibonacci EMAs 21,55,233 on the timeframes monthly, weekly and daily.
Multi Timeframe EMAs (Round@MWD)plot round number EMAs 20,50,200 on the timeframes monthly, weekly and daily.
RSI Multi Time Frame - Spot Panic Sell Moments and profit!Union of three RSI indicators: 1h, 4h and daily. In order to show 1h RSI, you have to set it as active time frame on the chart.
Purpose: spot "triple oversold" moments, where all the three RSI are under the threshold, which is 30 by default but editable.
Target Market: Cryptocurrencies. Didn't try it on other ones, may work as well. Fits Crypto well as, by experience, I can tell it usually doesn't stay oversold for long.
When the market panics and triple oversold occurs, the spot is highlighted by a green vertical bar on the indicator.
The indicator highlights triple overbought conditions as well (usually indicating strong FOMO), but I usually don't use it as a signal.
I suggest to edit the oversold threshold in order to make it fit the coin you're studying, minimizing false positives.
Special thanks to Heavy91, a Discord user, for inspiring me in this indicator.
Any editing proposal is welcome!
I reposted this script, as the first time I wrote it in Italian. Sorry for that.
Percent Difference Between VWAP and Price MTFShows the difference between vwap and price in percent.
You can can choose between multiple timeframe vwap. Default is normal daily.
The levels on the indicator can be changed to whatever you want to.
In the chart above we can see eurusd reverting up at 3% below monthly vwap, after the brexit dip, It then turns down again at 1% from monthly and lastly it turns up again at 2% from monthly.
Script is a small modification of this:
ForecastForecast (FC), indicator documentation
Type: Study, not a strategy
Primary timeframe: 1D chart, most plots and the on-chart table only render on daily bars
Inspiration: Robert Carver’s “forecast” concept from Advanced Futures Trading Strategies, using normalized, capped signals for comparability across markets
⸻
What the indicator does
FC builds a volatility-normalized momentum forecast for a chosen symbol, optionally versus a benchmark. It combines an EWMAC composite with a channel breakout composite, then caps the result to a common scale. You can run it in three data modes:
• Absolute: Forecast of the selected symbol
• Relative: Forecast of the ratio symbol / benchmark
• Combined: Average of Absolute and Relative
A compact table can summarize the current forecast, short-term direction on the forecast EMAs, correlation versus the benchmark, and ATR-scaled distances to common price EMAs.
⸻
PineScreener, relative-strength screening
This indicator is excellent for screening on relative strength in PineScreener, since the forecast is volatility-normalized and capped on a common scale.
Available PineScreener columns
PineScreener reads the plotted series. You will see at least these columns:
• FC, the capped forecast
• from EMA20, (price − EMA20) / ATR in ATR multiples
• from EMA50, (price − EMA50) / ATR in ATR multiples
• ATR, ATR as a percent of price
• Corr, weekly correlation with the chosen benchmark
Relative mode and Combined mode are recommended for cross-sectional screens. In Relative mode the calculation uses symbol / benchmark, so ensure the ratio ticker exists for your data source.
⸻
How it works, step by step
1. Volatility model
Compute exponentially weighted mean and variance of daily percent returns on D, annualize, optionally blend with a long lookback using 10y %, then convert to a price-scaled sigma.
2. EWMAC momentum, three legs
Daily legs: EMA(8) − EMA(32), EMA(16) − EMA(64), EMA(32) − EMA(128).
Divide by price-scaled sigma, multiply by leg scalars, cap to Cap = 20, average, then apply a small FDM factor.
3. Breakout momentum, three channels
Smoothed position inside 40, 80, and 160 day channels, each scaled, then averaged.
4. Composite forecast
Average the EWMAC composite and the breakout composite, then cap to ±20.
Relative mode runs the same logic on symbol / benchmark.
Combined mode averages Absolute and Relative composites.
5. Weekly correlation
Pearson correlation between weekly closes of the asset and the benchmark over a user-set length.
6. Direction overlay
Two EMAs on the forecast series plus optional green or red background by sign, and optional horizontal level shading around 0, ±5, ±10, ±15, ±20.
⸻
Plots
• FC, capped forecast on the daily chart
• 8-32 Abs, 8-32 Rel, single-leg EWMAC plus breakout view
• 8-32-128 Abs, 8-32-128 Rel, three-leg composite views
• from EMA20, from EMA50, (price − EMA) / ATR
• ATR, ATR as a percent of price
• Corr, weekly correlation with the benchmark
• Forecast EMA1 and EMA2, EMAs of the forecast with an optional fill
• Backgrounds and guide lines, optional sign-based background, optional 0, ±5, ±10, ±15, ±20 guides
Most plots and the table are gated by timeframe.isdaily. Set the chart to 1D to see them.
⸻
Inputs
Symbol selection
• Absolute, Relative, Combined
• Vs. benchmark for Relative mode and correlation, choices: SPY, QQQ, XLE, GLD
• Ticker or Freeform, for Freeform use full TradingView notation, for example NASDAQ:AAPL
Engine selection
• Include:
• 8-32-128, three EWMAC legs plus three breakouts
• 8-32, simplified view based on the 8-32 leg plus a 40-day breakout
EMA, applied to the forecast
• EMA1, EMA2, with line-width controls, plus color and opacity
Volatility
• Span, EW volatility span for daily returns
• 10y %, blend of long-run volatility
• Thresh, Too volatile, placeholders in this version
Background
• Horizontal bg, level shading, enabled by default
• Long BG, Hedge BG, colors and opacities
Show
• Table, Header, Direction, Gain, Extension
• Corr, Length for correlation row
Table settings
• Position, background, opacity, text size, text color
Lines
• 0-lines, 10-lines, 5-lines, level guides
⸻
Reading the outputs
• Forecast > 0, bullish tilt; Forecast < 0, bearish or hedge tilt
• ±10 and ±20 indicate strength on a uniform scale
• EMA1 vs EMA2 on the forecast, EMA1 above EMA2 suggests improving momentum
• Table rows, label colored by sign, current forecast value plus a green or red dot for the forecast EMA cross, optional daily return percent, weekly correlation, and ATR-scaled EMA9, EMA20, EMA50 distances
⸻
Data handling, repainting, and performance
• Daily and weekly series are fetched with request.security().
• Calculations use closed bars, values can update until the bar closes.
• No lookahead, historical values do not repaint.
• Weekly correlation updates during the week, it finalizes on weekly close.
• On intraday charts most visuals are hidden by design.
⸻
Good practice and limitations
• This is a research indicator, not a trading system.
• The fixed Cap = 20 keeps a common scale, extreme moves will be clipped.
• Relative mode depends on the ratio symbol / benchmark, ensure both legs have data for your feed.
⸻
Credits
Concept inspired by Robert Carver’s forecast methodology in Advanced Futures Trading Strategies. Implementation details, parameters, and visuals are specific to this script.
⸻
Changelog
• First version
⸻
Disclaimer
For education and research only, not financial advice. Always test on your market and data feed, consider costs and slippage before using any indicator in live decisions.
Globex Trap w/ percentage [SLICKRICK]Globex Trap w/ Percentage
Overview
The Globex Trap w/ Percentage indicator is a powerful tool designed to help traders identify high-probability trading opportunities by analyzing price action during the Globex (overnight) session and regular trading hours. By combining Globex session ranges with Supply & Demand zones, this indicator highlights potential "trap" areas where significant price reactions may occur. Additionally, it calculates the Globex session range as a percentage of the daily Average True Range (ATR), providing valuable context for assessing market volatility.
This indicator is ideal for traders in futures markets or other instruments traded during Globex sessions, offering a visual and analytical edge for spotting key price levels and potential reversals or breakouts.
Key Features
Globex Session Tracking:
Visualizes the high and low of the Globex session (default: 3:00 PM to 6:30 AM PST) with customizable time settings.
Displays a semi-transparent box to mark the Globex range, with labels for "Globex High" and "Globex Low."
Calculates the Globex range as a percentage of the daily ATR, displayed as a label for quick reference.
Supply & Demand Zones:
Identifies Supply & Demand zones during regular trading hours (default: 6:00 AM to 8:00 AM PST) with customizable time settings.
Draws semi-transparent boxes to highlight these zones, aiding in the identification of key support and resistance areas.
Trap Area Identification:
Highlights potential trap zones where Globex ranges and Supply & Demand zones overlap, indicating areas where price may reverse or consolidate due to trapped traders.
Customizable Settings:
Adjust Globex and Supply & Demand session times to suit your trading preferences.
Toggle visibility of Globex and Supply & Demand zones independently.
Customize box colors for better chart readability.
Set the lookback period (default: 10 days) to control how many historical zones are displayed.
Configure the ATR length (default: 14) for the percentage calculation.
PST Timezone Default:
All times are based on Pacific Standard Time (PST) by default, ensuring accurate session tracking for users in this timezone or those aligning with U.S. West Coast market hours.
Recommended Usage
Timeframes: Best used on 1-hour charts or lower (e.g., 15-minute, 5-minute) for precise entry and exit points.
Markets: Optimized for futures (e.g., ES, NQ, CL) and other instruments traded during Globex sessions.
Historical Data: Ensure at least 10 days of historical data for optimal visualization of zones.
Strategy Integration: Use the indicator to identify potential reversals or breakouts at Globex highs/lows or Supply & Demand zones. The ATR percentage provides context for whether the Globex range is significant relative to typical daily volatility.
How It Works
Globex Session:
Tracks the high and low prices during the user-defined Globex session (default: 3:00 PM to 6:30 AM PST).
When the session ends, a box is drawn from the start to the end of the session, capturing the high and low prices.
Labels are placed at the midpoint of the session, showing "Globex High," "Globex Low," and the range as a percentage of the daily ATR (e.g., "75.23% of Daily ATR").
Supply & Demand Zones:
Tracks the high and low prices during the user-defined regular trading hours (default: 6:00 AM to 8:00 AM PST).
Draws a box to mark these zones, which often act as key support or resistance levels.
ATR Percentage:
Calculates the Globex range (high minus low) and divides it by the daily ATR to express it as a percentage.
This metric helps traders gauge whether the overnight price movement is significant compared to the instrument’s typical volatility.
Time Handling:
Uses PST (UTC-8) for all time calculations, ensuring accurate session timing for users aligning with this timezone.
Properly handles overnight sessions that cross midnight, ensuring seamless tracking.
Input Settings
Globex Session Settings:
Show Globex Session: Enable/disable Globex session visualization (default: true).
Globex Start/End Time: Set the start and end times for the Globex session (default: 3:00 PM to 6:30 AM PST).
Globex Box Color: Customize the color of the Globex session box (default: semi-transparent gray).
Supply & Demand Zone Settings:
Show Supply & Demand Zone: Enable/disable zone visualization (default: true).
Zone Start/End Time: Set the start and end times for Supply & Demand zones (default: 6:00 AM to 8:00 AM PST).
Zone Box Color: Customize the color of the zone box (default: semi-transparent aqua).
General Settings:
Days to Look Back: Number of historical days to display zones (default: 10).
ATR Length: Period for calculating the daily ATR (default: 14).
Notes
All times are in Pacific Standard Time (PST). Adjust the start and end times if your market operates in a different timezone or if you prefer different session windows.
The indicator is optimized for instruments with active Globex sessions, such as futures. Results may vary for non-24/5 markets.
A typo in the label "Globe Low" (should be "Globex Low") will be corrected in future updates.
Ensure your TradingView chart is set to display sufficient historical data to view the full lookback period.
Why Use This Indicator?
The Globex Trap w/ Percentage indicator provides a unique combination of session-based range analysis, Supply & Demand zone identification, and volatility context via the ATR percentage. Whether you’re a day trader, swing trader, or scalper, this tool helps you:
Pinpoint key price levels where institutional traders may act.
Assess the significance of overnight price movements relative to daily volatility.
Identify potential trap zones for high-probability setups.
Customize the indicator to fit your trading style and market preferences.