Hodrick-Prescott MACD [Loxx]Hodrick-Prescott MACD is a MACD indicator using a Hodrick-Prescott Filter.
What is Hodrick–Prescott filter?
The Hodrick–Prescott filter (also known as Hodrick–Prescott decomposition) is a mathematical tool used in macroeconomics, especially in real business cycle theory, to remove the cyclical component of a time series from raw data. It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations. The adjustment of the sensitivity of the trend to short-term fluctuations is achieved by modifying a multiplier Lambda.
The filter was popularized in the field of economics in the 1990s by economists Robert J. Hodrick and Nobel Memorial Prize winner Edward C. Prescott, though it was first proposed much earlier by E. T. Whittaker in 1923.
There are some drawbacks to use the HP filter than you can read here: en.wikipedia.org
Included
Bar coloring
3 types of signals
Alerts
Loxx's Expanded Source Types
Alert
Timed AlertTradingView doesn't offer a way easily set timed alerts. This script solves that problem and also allows you to set variables in the script similar to other alerts.
The variables can be found here .
Multi Price AlertSometimes you need set some alert at specific price levels on a chart.
Now you able to set ten different price levels to get alert at this prices.
With this Indicator also Basic Accounts can set more than one alert at price levels.
How to Use :
1- Enable Indicator on your Chart
2- Input your prices on Indicator Settings
3- Active Indicator Alert on 1m Chart (Select Multi Price Alert on Conditions Menu & Once Per Bar on Options)
5- Enjoy !
Notice : If change at prices, you should remove and reset Alert again.
Good trading to all ...
Dragon Double RSI Overbought-Oversold With LabelThis indicator consist of tow RSI length that user can customize it. like length, overbought, oversold. like length, overbought, oversold. also it has one moving average where the user can select from different types of moving averages, price sources, lookback periods and resolutions
Alert example: multiple checked symbols and checked conditionsHere is the example how to check multiple conditions for multiple instruments using only ONE alert.
How to use :
Add into the code needed conditions and instruments.
Apply the indicator on the chart, call Create Alert Dialog and just click "Create".
Enjoy.
% up/down from SMA AlertsHi all! This script allows an alert option for conditions when the price increase 10% from the SMA and when price decrease 10% from the SMA.
The SMA length defaults to 20, but can be set to any length of your preference at “length” in the inputs tab of the script settings.
Value that increase and decrease 10% from SMA is able to visualize with a line but it can also be hidden in the Style tab.
Also, the default is 10%, but you can set % value of your preference such as 2%, 5%, at "% value" in the inputs tab.
For example with the default settings, if you set the alert condition "% up SMA" in the Alert settings dialog, this alert will be triggered when the price increase 10% from SMA. "% down SMA" will be triggered when the price decrease 10% from SMA.
-----------
このスクリプトは、価格がSMAから10%上昇した時と、10%下降した時の条件のアラートオプションを可能にします。
SMAの期間はデフォルトで20ですが、スクリプト設定のパラメータータブにある「期間」でお好みの期間に設定できます。
そしてこのSMAから10%上昇した値と下降した値は、ラインで視覚的に表示されますが、タイルタブで非表示に指定することも可能です。
また、デフォルトは10%ですが、2%や5%などと、パラメータータブにある「% value」でお好みの%値を設定する事ができます。
例えばデフォルト設定の場合、アラート設定ダイアログで条件を「% up SMA」で設定した場合は、もし価格がSMAから10%上昇したらアラートがトリガーされます。
「% down SMA」を指定した場合は、もし価格がSMAから10%下降したらアラートがトリガーされます。
Signal generatorThis simple script generates signals for testing the connection from TradingView to a REST API client via the webhook and demonstrates very basic concepts of gerenating alerts within the script.
This script also demonstrates how to visualize when a buy or a sell should take place and how to use diagnostics text for bug fixes/informational purposes.
This is for testing and learning only. Do not use with real money as losses WILL occur. This script is for educational purposes only and should only be used with demo accounts, never with real money .
Buy signals are generated when closing price is less then opening price.
Sell Signals are generated when closing price is greater then opening price.
Can also be used to test signal counting and very rudimentary dollar cost averaging.
MACD Multiple AlertsThis script help traders to catch bullish and bearish momentum. It creates an alert for 40 altcoins based on the MACD cross over and cross under.
The MACD input are adjustable in the settings and you can choose your favorite assets.
Simply add this indicator to the chart wait that if finish to load and then create an alert on the time frame of your choice.
Enjoy your trading
F_rank_01
Bounce Manager TrendlinesThe trendline script is made for manual input of trendlines using point clicks on the chart. The script will then see if price respects these lines by the parameters you input in settings panel. On a respectable bounce it will print buy/sell arrows. The script also has functionality to send alerts, this is helpful if you want to automate trendlines . I created this script and many others under the bounce manager toolkit to expand on the signalling capabilities of popular drawing tools as I find using just a crossover to be lacking especialy for full automation.
components:
- Line respect: When price moves past this the script will no longer look for entry until a new trend has been established. The line can also be used as a stop loss.
- Confirmation: When price touches the line during a trend it
will wait to cross over this line to confirm a reaction from the line.
- Consolidation filter: A trend filtering system, this is a distance from
the line price has to break to confirm trend direction.
- Stop loss: This can be set to a percentage distance from the low after
bounce. Or it can be set to the line respect line
- Take profit: This can be a fixed take profit target or a risk to reward
based take profit. With risk to reward it will multiply the stop loss
distance by the input and use that to create target (green cross)
- ATR based or % based: there are 2 versions of the script, one for strict
percentage based logic and another one based on ATR values
If you are having problems figuring out which settings to use I recommend you check the Bounce Manager ATR script for reference as this script plots the components:
Zignaly automation settings:
zignaly integration, you can use the settings panel to decide your risk management. Option to use a fixed take profit % or an automatic risk to reward calculation based on the stop loss. Stop loss can get calculated using the max violation setting as a stop loss (this will put stop loss below line respect level) or when not checked it will use 0.01% below the low of the signal candle as stop loss. Just add your zignaly private key in the settings and use any alert function call as alert. Make sure to use zignaly.com as your webhook url.
If 5 trendlines are not enough use the 20 line input version, this script is for the clean strong trendline trader.
Part of the Honest Algo indicator suite
Moving Averages With Cross AlertsA simple way to add up to 5 moving averages with optional crossover/crossunder alerts.
Available options for Moving Average Type are:
SMA
EMA (default)
HMA
RMA
WMA
VWMA
VWAP
ALMA
By default, 5 moving averages are enabled and set to the following:
MA1 set to 5
MA2 set to 13
MA3 set to 50
MA4 set to 200
MA5 set to 800
Each moving average has the following options:
Enable/Disable
Source (default is close)
Length
Color
Heikin-Ashi Trend AlertThis script:
Adds a Heikin-Ashi line to the chart (EMA-based).
Provides alerts triggered when the color goes from green to red and vice versa.
Just add the indicator to the chart, create an alert and select " Heikin-Ashi Trend Alert " from the dropdown. Profit.
Extended candle alertThis indicator lets you set an alert that triggers when a candle body has got a specific % extension.
Customizable settings
Extension % threshold: the % of the candle extension that has to trigger the alert
Instructions to make it work
Add the indicator to your layout
Set the desidered extension % threshold
Create an alarm (Alt + A)
In the first condition toolbox select "Ext candle alert"
In the second condition toolbox select either long or short condition
Press create (unless you want to change secondary stuff like notification settings)
OBV+EMA HistogramHistogram of the difference between On Balance Volume and an EMA of the On Balance Volume (OBV + EMA).
Using a 55 EMA, on the daily timeframe of BTC, bull/bear trends occur when the histogram is above/below the zero line respectively.
Divergences also have a notable effect.
-- Added alert conditions when OBV crosses EMA to signal a possible trend change, for bullish and bearish cases.
Renko Candles OverlayHello All,
For long time I got many request for Renko Candles and now here it's, Renko Candles Overlay . I tried to make almost everything optional, so you can play with the options as you want.
Let see the options:
Method: the option for brick scaling method: ATR, ATR/2, ATR/4, Percent, Traditional
- ATR Period: period for Average True Range and it's valid if the method is ATR
- ATR/2 Period: period for Average True Range and it's valid if the method is ATR/2
- ATR/4 Period: period for Average True Range and it's valid if the method is ATR/4
- Traditional: User-defined brick size, it's valid if the method is Traditional
- Percent: Percent of Close price, it's valid if the method is Percent
if the method is not Traditional (fixed brick size) then Brick size is calculated/updated when new bricks added. so The box sizes may be different because of the calculation is dynamic.
Levels & Lines for new Bricks: if you enable this option then the script shows the levels for new brick
Change Bar Color: optionally the script changes the bar color by using direction of the bricks
and some other options for coloring.
The script shows the bricks for visible area, which is approximately 280 candles. so if you change the width and number of the bricks then number of bricks that is shown is adjusted automatically to fit the screen. you can see the examples below:
The script shows the levels to new brick as a line and label:
Because of real-time bar is not confirmed until the candle close, the script shows the bricks as Unconfirmed , and unconfirmed bricks shown in different color:
You can change the width of the bricks (width is 10 in following example):
Optionally candle colors are changde by the direction of the bricks:
If you have any recommendation then please drop a comment under the script ;)
Enjoy!
Alligator: Three signals confirmation with AlertsHello Trading Viewers,
The following is the William’s Alligator indicator with alerts indicating strong momentum, it can be used for scalping in lower time-frames or just riding the momentum in 1hr or 4hrs charts.
Input choices are:
1. Source of Data: Open, Low, High, Close, HL2, HLC3 and so on.
2. Simple and Exponential are the two choices of moving averages.
3. Lips, Teeth and Jaws input numbers are Fibonacci numbers with offsets from -4 to +4.
4. Up Momentum and Down Momentum signals will be plotted top and bottom of the charts respectively when conditions are met.
Idea used to confirm strong momentum
When (High + Low / 2) price is greater than Alligator’s Lips, Teeth, and Jaws, it is considered as a good time to go long; however, to strengthen the idea, the up-momentum condition needs to be approved three times consecutively. (Three consecutive candle bars should remain above Lips, Teeth, and Jaws to trigger an alert signal and plot Up- momentum shape on the charts)
The same idea with down-momentum, but the condition (High + Low / 2) price should be less than Alligator’s Lips, Teeth, and Jaws.
There is an alert set-up, once strong momentum is spotted it will send an alert once per bar close. You can relax and run an errand when the alert is not triggered.
Happy Trading!
TPTR_Dynamic_Ratio_CorrelatorThe script provides a way to compute ratio between two indexes (or stocks) of your choice, and paints a "up-arrow" below the first candle where and when the value of the ratio exceeds your threshold of choice.
It also creates a table summarizing the value of your securities, and the value of the ratio below.
The script will also alert you with a message (automatically) when the ratio of your security_1 and security_2 exceeds the ratio.
[DA]SAR HILODescription of the indicator:
The SAR indicator will indicate a trend change on the chart:
LONG: Red up arrow + GOLONG alert + red horizontal line
SHORT: Blue down arrow + GOSHORT alert + blue horizontal line
A HILO trend channel is also formed, which is reset when the trend changes.
The HILO channel will help you see the price movement in the channel.
Trend change alerts will only work at the close of the current bar.
For GOLONG/GOSHORT alerts to work, you need to select in the Tradingview menu:
Alerts => Indicator Name => Condition => Any call to the alert() function (Any alert() function call)
Price and trend direction in the table:
LONG + Red: The price is trending LONG
LONG + Yellow: The price is moving against the LONG trend
SHORT + Blue color: The price is moving along the SHORT trend
SHORT + Yellow: The price is moving against the SHORT trend
▲▼ Arrows: Rising/Falling bar
% Percentage taken from blue/red levels
I will be glad to receive your feedback on the indicator operation.
[Rygel] MACD 4C with divergences, crossovers and alertsThis indicator is a reliable, exhaustive, instant, simple divergence detector for the MACD 4C oscillator.
I've struggled for months to find a MACD divergence indicator I can rely on, I've tinkered with the ones I found and never was satisfied by the final result. For all of them important divergences were not shown, for some divergences was shown too late, for others divergence lines was not drawn, some even shown some strange exotic divergences... I played will all the parameters and something was always wrong or missing at the end.
It was even worse for the MACD 4C indicator, the 4-color MACD, which I prefer to use.
So I finally decided to write my own divergence algorithm and to create my own indicator. After a few attempts, here's the result.
This MACD indicator is using the same divergence detection algorithm I wrote for my RSI indicator. You'll find on its description page a comparison of my divergence algorithm with other ones to see how it differs.
When I built this indicator, my objectives were to create one that is:
Reliable. I didn't want to have to double-check an indicator to make sure it's doing what I expect it to do. I want to be able to look at it for one second and know I can rely on it.
Exhaustive. I didn't want to have to rely on multiple indicators to be sure I'm not missing a divergence.
Instant. I wanted the divergences to be shown as soon as soon as they form and not after a pivot is confirmed. For some indicator, when the divergence is displayed, it's already too late to act on it.
Simple. I wanted my indicator to be clean, readable and not visually aggressive. The main objective of this indicator is to show divergences and I didn't want to visually overload it with unrequired information.
I wanted my indicator to be a simple as possible, nonetheless you'll find a few parameters to tinker with. Many of them will need no explanation but here's the list.
Show signal line: disabled by default. Show the MACD signal line.
Color signal line: disabled by default. Show the signal line as green when it goes up and read when it goes down.
Show signal crossovers: enabled by default. Show a green dot when MACD crosses up its signal line and a red dot when it crosses down.
Show zero line: enabled by default. Show a line at the 0 value.
Show zero crossovers: disabled by default. Show a green triangle when MACD crosses up the 0 line and a red triangle when it crosses down.
Show regular divergences: enabled by default.
Show hidden divergences: disabled by default for readability. I try to keep the indicator as clean as possible by default.
Bullish regular divergence color : no explanation needed I suppose.
Bullish hidden divergence color : same.
Bearish regular divergence color : ditto.
Bearish hidden divergence color : uhh.
Show overbought and oversell backgrounds : when RSI is oversold or oversell, the background color changes to red or green. The indicator uses two levels of oversold/overbought. When the RSI is strongly oversold/overbought the background color gets brighter. You can configure these levels in the advanced parameters.
Advanced parameters:
MACD fast moving average length: 12 by default.
MACD slow moving average length: 26 by default.
MACD signal moving average length: 9 by default.
Show divergences before pivot confirmation : enabled by default. Divergences will appear as soon as possible, before the pivot is confirmed by another candlestick. Unconfirmed divergences will appear as dashed lines then disappear if not confirmed or turn to solid lines if confirmed. This may create false positives with alerts as the divergence may disappear.
Minimum bars to check: 5 by default. As this indicator detects absolutely all the divergences, some may be insignificant and it may become unreadable without some filtering. If you want to see absolutely all the divergences, you may lower this value. Please note TradingView limits to 50 how many lines are displayed at the same time on an indicator. So when you display more divergences, some in the past disappear. It's not usually an issue but if you scroll back in time, divergences will stop to show at one point in the past.
Maximum bars to check: 75 by default. Divergences may go far in the past, this parameters limit how old a divergence may be. You can higher it to show more divergences.
Show pivots: disabled by default. Show the pivot points used for divergence detections.
This indicator offers the following alerts:
Any divergence
Bearish divergence
Bullish divergence
Regular bearish divergence
Regular bullish divergence
Hidden bearish divergence
Hidden bullish divergence
MACD becoming positive
MACD becoming negative
MACD crossing up signal line
MACD crossing down signal line
Please note TradingView limits for performance reason to 50 the number of lines you can display on an indicator at the same time. So when you scroll back in time, at one point divergences will stop to show. If you want to see divergences far in the past, you may need to use the replay feature or to configure stronger filtering settings.
I hope you'll enjoy this indicator as much as I do! :)
Feel free to comment if you experience a bug or if an important feature is missing for you. (Please note the core of this indicator is divergence detection, I want to keep it simple so I will probably not add many unrelated features to it.)
[Rygel] RSI with divergences and alertsThis indicator is a reliable, exhaustive, instant, simple divergence detector for the RSI oscillator.
I've struggled for months to find a RSI divergence indicator I can rely on, I've tinkered with the ones I found and never was satisfied by the final result. For all of them important divergences were not shown, for some divergences was shown too late, for others divergence lines was not drawn, some even shown some strange exotic divergences... I played will all the parameters and something was always wrong or missing at the end.
So I finally decided to write my own divergence algorithm and to create my own indicator. After a few attempts, here's the result.
At first. Please find below a quick comparison of this indicator with some of the most popular RSI divergence indicators on TradingView. I've hidden their names as it's not my intention to show them in a bad light. These indicators are great and some of you may even find them better than this one, they were just not what I was looking for.
You will most likely notice all of them are missing divergences but not always the same. You'll have to combine all of them to get (almost) all the divergences.
When I built this indicator, my objectives were to create one that is :
Reliable. I didn't want to have to double-check an indicator to make sure it's doing what I expect it to do. I want to be able to look at it for one second and know I can rely on it.
Exhaustive. I didn't want to have to rely on multiple indicators to be sure I'm not missing a divergence.
Instant. I wanted the divergences to be shown as soon as soon as they form and not after a pivot is confirmed. For some indicator, when the divergence is displayed, it's already too late to act on it.
Simple. I wanted my indicator to be clean, readable and not visually aggressive. The main objective of this indicator is to show divergences and I didn't want to visually overload it with unrequired information.
I wanted my indicator to be a simple as possible, nonetheless you'll find a few parameters to tinker with. Many of them will need no explanation but here's the list.
Show regular divergences : enabled by default.
Show hidden divergences : disabled by default for readability. I try to keep the indicator as clean as possible by default.
Bullish regular divergence color : no explanation needed I suppose.
Bullish hidden divergence color : same.
Bearish regular divergence color : ditto.
Bearish hidden divergence color : uhh.
Show overbought and oversell backgrounds : when RSI is oversold or overbought, the background color changes to red or green. The indicator uses two levels of oversold/overbought. When the RSI is strongly oversold/overbought the background color gets brighter. You can configure these levels in the advanced parameters.
Advanced parameters:
RSI source: "close" by default.
RSI length: 14 by default.
Show divergences before pivot confirmation : enabled by default. Divergences will appear as soon as possible, before the pivot is confirmed by another candlestick. Unconfirmed divergences will appear as dashed lines then disappear if not confirmed or turn to solid lines if confirmed. This may create false positives with alerts as the divergence may disappear.
Minimum bars to check: 5 by default. As this indicator detects absolutely all the divergences, some may be insignificant and it may become unreadable without some filtering. If you want to see absolutely all the divergences, you may lower this value. Please note TradingView limits to 50 how many lines are displayed at the same time on an indicator. So when you display more divergences, some in the past disappear. It's not usually an issue but if you scroll back in time, divergences will stop to show at one point in the past.
Maximum bars to check: 50 by default. Divergences may go far in the past, this parameters limit how old a divergence may be. You can higher it to show more divergences.
Use limits for divergences: enabled by default. Don't show divergences when they are above or below a threshold. Another filtering options to make sure only relevant divergences are shown.
Minimum value for bearish divergence: 40 by default.
Maximum value for bullish divergence: 60 by default.
Show pivots: disabled by default. Show the pivot points used for divergence detections.
Oversold level: 30 by default. A red background is shown when the indicator goes below this level.
Overbought level: 70 by default. A green background is shown when the indicator goes above this level.
Strongly oversold level: 20 by default. A brighter red background is shown when the indicator goes below this level.
Strongly overbought level: 80 by default. A brighter green background is shown when the indicator goes above this level.
Show moving average: disabled by default. Add a moving average to the indicator.
Moving average type: SMA by default. You may choose between Bollinger Bands, EMA, SMA, SMMA (RMA), VWMA and WMA.
Moving average length: 14 by default.
Bollinger Band standard deviation 2 by default.
This indicator has the following alerts:
Any divergence
Bearish divergence
Bullish divergence
Regular bearish divergence
Regular bullish divergence
Hidden bearish divergence
Hidden bullish divergence
Please note TradingView limits for performance reason to 50 the number of lines you can display on an indicator at the same time. So when you scroll back in time, at one point divergences will stop to show. If you want to see divergences far in the past, you may need to use the replay feature or to configure stronger filtering settings.
I hope you'll enjoy this indicator as much as I do! :)
Feel free to comment if you experience a bug or if an important feature is missing for you. (Please note the core of this indicator is divergence detection, I want to keep it simple so I will probably not add many unrelated features to it.)
RSI Rising Crypto Trending AlertAlert version of the strategy with the same name
This is crypto and stock market trending strategy designed for long timeframes such as 4h+
From my tests it looks like it works better to trade crypto against crypto than trading against fiat.
Indicators used:
RSI for rising/falling of the trend
BB sidemarket
ROC sidemarket
Rules for entry
For long: RSI values are rising, and bb and roc tells us we are not in a sidemarket
For long: RSI values are falling, and bb and roc tells us we are not in a sidemarket
Rules for exit
We exit when we receive an opposite direction.
Cuation: Because this strategy uses no risk management, I recommend you takje care with it.
If you have any questions, let me know !
Scalping Trading System ALERT Crypto and StocksThis is the alert version of the strategy with the same name.
Indicators
SImple Moving Average
Exponential Moving Average
Keltner Channels
MACD Histogram
Stochastics
Rules for entry
long= Close of the candle bigger than both moving averages and close of the candle is between the top and bot levels from Keltner . At the same time the macd histogram is negative and stochastic is below 50.
short= Close of the candle smaller than both moving averages and close of the candle is between the top and bot levels from Keltner . At the same time the macd histogram is positive and stochastic is above 50.
Rules for exit
We exit when we meet an opposite reverse order.
This strategy has no risk management inside, so use it with caution !
Profit Percentage TrackerThis script provides a quick and easy way to visualize profits in a chart, based on the given entry date and price.
Optionally, alerts can be sent when profits cross up the given " profit unit ".
In short:
Tracks how much profit one could take based on the input " entry date " and the input " entry price "
These inputs are interactive (www.tradingview.com)
Displays the result in a label on top of the last candle
(Optional) Sends alerts based on the given " profit unit ", that is: if ' 0.5 ' is given, then an alert is triggered every time the profit is raised by that number
(Be careful with low values, as TradingView could stop an alert if it triggers too much.)
For alerts to be displayed, a " script alert " must be created right after the script was added to the chart:
- www.tradingview.com
(Choose ' Profits ' as condition and ' Any alert() function call ')
Good to know: if you check " Notify on app ", alerts can be delivered directly to your phone:
i.imgur.com
Prerequirements :
The chart's timezone has to be set to " Exchange " (this is required in order to support the alert's logic):
- kodify.net
TWP Next Bar Close Countdown█ OVERVIEW
This script displays the time remaining for your charts current timeframe.period or a higher timeframe with the ability to create alerts that ping on the opening of the new bar that you have selected. It can be very easy to get bogged down in the charts when day trading on smaller timeframes and forgetting that it is the wave of longer timeframe traders that are setting the tone. This script was born out of this pitfall that I was noticing in my own trading.
█ CONCEPTS
The script uses a series of functions to get produce the time remaining and texts for the top and bottom rows within the table display.
█ FEATURES
1 — Resolution
• Auto / Manual selection
• There is tooltip explains how the automatic time selection operates (see below)
AUTO_TIMEFRAME_TOOLTIP = "When the Auto option is selected, the timeframe of the indicator is chosen automatically based on the chart timeframe. The Timeframe dropdown is ignored. The automated timeframes are:
'10 minutes' for any chart timeframes below '1 minute'
'1 hour' for any chart timeframes starting from '1 minute' up to '5 minutes'
'4 hours' for any chart timeframes starting from '5 minutes' up to '60 minutes'
'1 day' for any chart timeframes starting from '1 hour' up to '4 hours'
'1 week' for any chart timeframes starting from '4 hours' up to '1 day'
'1 month' for any timeframes starting from '1 day' up to '1 week'
'3 months' for any timeframes starting from '1 week' up to '1 month'
'12 months' for any timeframes above '1 month'"
2 — Text
• Size selection
• Color selection
3 — Display
• Frame color selection
• Display position selection
4 — Alerts
• Market session selection
█ HOW TO USE
• Add it to your chart, select your timeframe, change up your colors, and enjoy yourself
█ NOTES
• We have no control over when realtime updates occur. A realtime bar can open, and then no realtime updates can occur until the open of the next realtime bar. The time between updates can vary considerably. For more please check out Pine's execution model and bar states.
• As a reminder, I did make this script for myself so if you find that you are using a 2-hour alert or countdown the formatting for the words may not be succinct as they should be. We will write that loss off to my growing pine skills
█ LIMITATIONS
• You will not be able to retrieve the time from a timeframe smaller than what is currently selected for the chart.