TradingView Alerts to MT4 MT5 - Forex, indices, commoditiesHowdy Algo-Traders! This example script has been created for educational purposes - to present how to use and automatically execute TradingView Alerts on real markets.
I'm posting this script today for a reason. TradingView has just released a new feature of the PineScript language - ALERT() function. Why is it important? It is finally possible to set alerts inside PineScript strategy-type script, without the need to convert the script into study-type. You may say triggering alerts straight from strategies was possible in PineScript before (since June 2020), but it had its limitations. Starting today you can attach alert to any custom event you might want to include in your PineScript code.
With the new feature, it is easier not only to execute strategies, but to maintain codebase - having to update 2 versions of the code with each single modification was... ahem... inconvenient. Moreover, the need to convert strategy into study also meant it was required to rip the code from all strategy...() calls, which carried a lot of useful information, like entry price, position size, and more, definitely influencing results calculated by strategy backtest. So the strategy without these features very likely produced different results than with them. While it was possible to convert these features into study with some advanced "coding gymnastics", it was also quite difficult to test whether those gymnastics didn't introduce serious, bankrupting bugs.
//////
How does this new feature work? It is really simple. On your custom events in the code like "GoLong" or "GoShort", create a string variable containing all the values you need inside your alert and this string variable will be your alert's message. Then, invoke brand new alert() function and that's it (see lines 67 onwards in the script). Set it up in CreateAlert popup and enjoy. Alerts will trigger on candle close as freq= parameter specifies. Detailed specification of the new alert() function can be found in TradingView's PineScript Reference (www.tradingview.com), but there's nothing more than message= and freq= parameters. Nothing else is needed, it is very simple. Yet powerful :)
//////
Alert syntax in this script is prepared to work with TradingConnector. Strategy here is not too complex, but also not the most basic one: it includes full exits, partial exits, stop-losses and it also utilizes dynamic variables calculated by the code (such as stop-loss price). This is only an example use case, because you could handle variety of other functionalities as well: conditional entries, pending entries, pyramiding, hedging, moving stop-loss to break-even, delivering alerts to multiple brokers and more.
//////
This script is a spin-off from my previous work, posted over a year ago here: Some comments on strategy parameters have been discussed there, but let me copy-paste most important points:
* Commission is taken into consideration.
* Slippage is intentionally left at 0. Due to shorter than 1 second delivery time of TradingConnector, slippage is practically non-existing.
* This strategy is NON-REPAINTING and uses NO TRAILING-STOP or any other feature known to be causing problems.
* The strategy was backtested on EURUSD 6h timeframe, will perform differently on other markets and timeframes.
Despite the fact this strategy seems to be still profitable, it is not guaranteed it will continue to perform well in the future. Remember the no.1 rule of backtesting - no matter how profitable and good looking a script is, it only tells about the past. There is zero guarantee the same strategy will get similar results in the future.
Full specs of TradingView alerts and how to set them up can be found here: www.tradingview.com
Cerca negli script per "alert"
FOMO Alert (Miu)This indicator won't plot anything to the chart.
Please follow steps below to set your alarms based on price range variation:
1) Add indicator to the chart
2) Go to settings
3) Choose timeframe which will be used to calculate bars
4) Choose how many bars which will be used to calculate max and min range
5) Choose max and min range variation (%) to trigger alerts
5) Choose up to 6 different symbols to get alert notification
6) Once all is set go back to the chart and click on 3 dots to set alert in this indicator, rename your alert and confirm
7) You can remove indicator after alert is set and it'll keep working as expected
What does this indicator do?
This indicator will generate alerts based on following conditions:
- If min and max prices reach the range (%) from amount of bars on timeframe set for any symbol checked it will trigger an alert.
- If next set of bars reaches higher range than before it will trigger an alert with new data
- If next set of bars doesn't reach higher range than before it will not trigger alerts, even if they are above the range set (this is to prevent the alert to keep triggering with high frequency)
Once condition is met it will send an alert with the following information:
- Symbol name (e.g: BTC, ETH, LTC)
- Range achieved (e.g: 3,03%)
- Current symbol price and current bar direction (e.g: 63,477.1 ▲)
This script will request lowest and highest prices through request.security() built-in function from all different symbols within the range set. It also requests symbols' price (close) and amount of digits (mintick) for each symbol to send alerts with correct value.
This script was developed with main purpose to send alerts when there are strong price movements and I decided to share with community so anyone can set different parameters for different purposes.
Feel free to give feedbacks on comments section below.
Enjoy!
BollingerBands Strat + pending order alerts via TradingConnectorSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 14, 17, 20 and 23.
SCRIPT INCLUDES PENDING ORDERS AND ALERTS! Alert will be sent to MetaTrader when order is triggered, but not yet filled. That means if market conditions change and order does not get filled, it needs to be cancelled as well, and there are alerts for that in the script as well.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
Custom Screener with Alerts V2 [QuantNomad]TradingView just recently announced the alert() function that allows you to create dynamic alerts from both strategies and studies.
So I decided to update custom screener I published before. It was based on alerts from orders in strategies, that was the only way to create dynamic alerts in PineScript at that point.
With the alert() function code become cleaner and more readable.
It works for up to 40 symbols at the same time.
You can create an alert from it easily by selecting screener name from the list and then selecting "Any alert() function call".
No additional configuration is required, message and alert on close I set up in the code.
I created as an example a screener that tracks both overbought (RSI > 70) and oversold stocks (RSI < 30).
To create your own screener you have to change only screenerFunc().
By design it should output 2 values:
cond - True/False Boolean variable. Should this instrument be displayed in the screener?
value - Additional numeric value you can display in your screener. I display RSI level for selected stocks for example.
Link to the old screener:
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Movable Stop + Trail + Alerthello everybody !
.....
this indicator helps you to get a better trading setting.
it's similar to the default draw tool from the trading view but the difference is you can add Trail stop and Alert .
.....
It also helps to free accounts to set more than 1 Alarm !!!
.....
Alert setting
just remember after you see set an alert if you change stop or entry, the alert will work with previous values/settings.
so you need to recreate an alert.
also don't change alert setting
.....
indicator setting
How is it works ?
...
settings
...
everything on :
you can see the information on the table
...
short sample :
everything on
...
simple short trade setting:
.....
my goal is to upgrade this indicator with your ideas.
not financial advice !
please , share your ideas with me to improve the indicator
I would like to see what you think about this indicator <3
also if you have any ideas to create an indicator or strategy you can make contact with me .
have a great day.
RSI Strategy with alerts via TradingConnector to ForexSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 12 and 17.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
BTC & ETH Alert SystemWith Tradingview's free plan, only one alert is allowed. The purpose of this indicator is to allow for two alerts--one for BTC and one for ETH.
How to use the alert system:
1. Set the desired value for BTC and ETH that you want to be alerted for
2. Set an alert on the indicator by clicking the three ellipses and then "Add Alert"
3. Set the alert to go off if the value of the indicator is greater than 0.
The example is of BTC using an alert of $10,000 and an alert of ETH at $2,000 (untriggered)
The script can be easily modified to be used for different assets
Cyatophilum Bands Pro Trader V3 [ALERTSETUP]An Original Automated Strategy that can be used for Manual or Bot Trading, on any timeframe and market.
>> Presentation <<
This script comes with a Backtest Version
How it works
No, these are NOT Bollinger Bands..
The Cyatophilum Bands are an original formula that I created. You will probably never find it anywhere else.
Their behavior is the following:
When they are horizontal it means the trend is going sideways and they represent supports (lower band) and resistances (upper band).
When they are climbing or falling it means the trend is either bullish or bearish and they represent Trend Lines.
The strategy enters Long on a Bull Breakout and enters Short on a Bear Breakout.
The exits are triggered either on a Trend Reversal, a Stop Loss or a Take Profit.
FEATURES
Take Profit System
Stop Loss System
Show Net profit Line
More features here
Finding a profitable configuration is GUARANTEED
0. Choose your symbol and timeframe. Then add the Backtest version to your chart. If at any time you decide to change your timeframe, go back to step 1.
1. Open the strategy tester and look at the buy & hold line.
If it is mostly climbing (last value greater than 0) then it means we are in a bull market. You should then opt or a long only strategy.
If it is mostly dropping (last value lower than 0) then it means we are in a bear market. You should then opt or a short only strategy.
Note : This first step is really important. Trading against the market has very little chances to succeed.
2. Go into the Strategy Input Parameters:
check "Enable Long Results" and uncheck "Enable Short Results" if you are in a long only strategy.
check "Enable Short Results" and uncheck "Enable Long Results" if you are in a short only strategy.
3. Open the Strategy Tester and open the Strategy Properties.
We are going to find the base parameters for the Bands.
The "Bands Lookback" is the main parameter to configure for any strategy. It corresponds to how strong of a support and resistance the bands will behave. The lower the timeframe, the higher lookback you will need. It can move from 10 to 60. For example 60 is a good value for a 3 minute timeframe. Try different values, and look at the "net profit" value in the Overview tab of the Strategy Tester. Keep the Lookback value that shows the best net profit value.
Then play with the "Bands Smoothing" from 2 to 20 and keep the best net profit value.
The "Band Smoothing" is used to reduce noise.
Usually, the default value (10) is what gives the best results.
From this point you should already be able to have a profitable strategy (net profit>0), but we can improve it using the Stop Loss and the Take Profit feature.
4. To activate the Stop Loss feature, click on the "SECURITY" checkbox
You should see horizontal red lines appear.
A Long/short exit alert will be triggered if the price were to cross this line. (A red Xcross will appear)
Choose the Stop Loss percentage.
On top of that, you can enable the feature "Trailing Stop". It will make the red line follow the price, at a speed that you can configure with the "Trailing Speed" parameter.
Now, sometimes a stop is triggered and it was just a fakeout. You can enable "Re-entries after a stop" to avoid missing additional opportunities.
5. To activate the Take Profit feature, click on the "TAKE PROFIT" checkbox
You should see horizontal green lines appear.
A Long/short exit alert will be triggered if the price were to cross this line. (A flag will appear)
Choose the Take Profit percentage.
A low takeprofit will provide a safer strategy but can reduce potential profits.
A higher takeprofit will increase risk but can provide higher potential profits.
6. Money Management
You can configure the backtest according to your own money management.
Let's say you have 10 000 $ as initial capital and want to trade only 5%, set the Order Size to 5% of Equity.
You can increase net profit by increasing the order size but this is at your own risk.
How to create alerts explained here
Sample Uses Cases
Use it literally anywhere
This indicator can be used on any timeframe and market (not only cryptocurrencies).
About the Backtest below
The Net Profit (Gross profit - Gross loss) is calculated with a commission of 0.05% on each order.
No leverage used. This is a long strategy.
Each trade is made with 10 % of equity from an inital capital of 10 000$. The net profit can be bigger by increasing the % of equity but this a trader's rule to minimise the risk.
I am selling access to all my indicators on my website : blockchainfiesta.com
To get a 2 days free trial, just leave a comment , thanks !
Join my Discord for help, configurations, requests, etc. discord.gg
Weis Wave Volume with alert [LazyBear]LFI added alert conditions to LazyBear's indicator on the second bar of a turn to bullish or bearish.
To use alerts:
be sure you are on the interval you want to create your alert,
be sure the indicator inputs are the way you want them,
create an alert, choose this indicator and then choose one of the 2 conditions.
Changes to the inputs after an alert was created require alerts to be recreated.
The alerts trigger on the second bar to avoid noise.
I also changed the default aesthetics, but more importantly the default period (from 2 to 5, because that's what I use most often).
Moving Average Variable Kit W/ Alerts V3 [Moon]Create your own MA system
5 basic kinds of Moving Average types available for now
DEMA
EMA
SMA
TEMA
WMA
Mix and match moving average types and lengths.
Create your own alerts built into Tradingview.
Turn alerts or MAs off or on with 1 click.
Choose visual transparency and alert coloration - everything is customizable.
Trend candles on crossovers.
Choose your MA input source.
Create your own MA cloud or cloud ribbons.
Trend MA coloration on candle or bar interactions.
It really empowers you to experiment and create your own trading system or strategy.
Don't be afraid to use Renko or Heikin Ashi for trend spotting or reversals.
Copy built in exchange bands or indicators for an edge up on the competition or exchange users (these are heavily watched and in my opinion do affect the price action especially on smaller coins like alts).
This is Binance's default kit that you can easily make (7/25/99) SMAs.
Works well on traditional markets or Forex | Should be cross compatible on any asset or timeframe.
Turn off a majority of signals except for "buy" or "sell" alerts. Use these clusters to DCA, short, long or take profit.
Use it to monitor classic "Golden" or "Death" crosses - Set a TV alert to get a notification when it official goes off.
These are just a few of the things you can create. I encourage you to explore further.
Send me a DM if interested.
MA Proximity Alert SystemThis script enables you to get an alert when the price gets in close proximity to moving average of your choice.
►Proximity is a true range multiplied by the number of your choice
►It is designed to be used as a one-use alert. If you enable it to give you one alert per bar close, it is possible to limit the spam by number of periods for which price must be outta proximity range
►Calculations T3, EMA, SMA for true range channel
►EMA and SMA for moving average
I circled the areas where I find the reaction somewhat interesting. Although, I think there are more areas when alert would be useful in the chart.
Have a great trade!
Cyatophilum SAR-MA Strategy [ALERT SETUP]An Automated Strategy based on Parabolic SAR and EMAs, also called the SARMA Strategy. Works on any timeframe and market.
Read More
This indicator will trigger long/short signals entries and exits. Excellent for manual or bot trading!
It has a stop loss system that you can activate to reduce risk.
Note: If a stop loss is reached, an exit alert is triggered.
This is the Alert Setup version. That means it is used to create automatic email or SMS alerts.
It has a Backtest version that you can use to find the best configuration. I will also be there to help you on my Discord channel .
Sample Use cases
Get the indicator today!
inwCoin HMA AlertSimple alert to go along with the inwCoin HMA Strategy
Please not that the alerts are persistent 2.70% , if you already enter the position,
just ignore the rest of the same alert until the opposite alert show up
( long then short / or short then long , if change, just close and enter opposite position )
You can set the alert and let it tell you to iOS app via TradingView app ( yey! )
Please note that, if you don't have bot to track your trailing start/stop. you have to enter the TP/SL manually ( also tracking the position )
So... be careful to follow this alert. just try it with small amount of money first.
and make sure to set stop loss every time because OKEX is a portfolio killer if you don't have any stop loss.
** if you cannot trailing stop bot, just uncheck the "Aggressive Strategy" in both strategy and alert to reduce alert to minimum level.
BB and RSI Indicator Alert v0.3 by JustUncleLI have just recently revised this indicator alert for public release. This is for the 60sec Bollinger Band break Binary Option traders.
This indicator alert is a variation of one found in a well known Broker's marketing videos. It uses Bollinger bands, RSI and moving averages. Included is a pre-warning alert condition. The strategy and settings are designed for 1min charts and Binary Options, but it could work for up to 15 min charts.
The default settings are BB(14,2) and RSI(11) with 75/25 Levels boundaries. To be a valid trade the RSI needs to be within 75/25 channel. The optional Market direction filter is enabled by default and is calculated by two EMA (200 and 50):
When 200ema rising and 50ema above 200ema then market going up.
When 200ema falling and 50ema below 200ema then market going down.
A potential Bollinger Break reversal trades identified by shapes: The purple diamond is the pre-warning purple alert and the green and red pointers with the PUT/CALL labels are the trade alerts. Make Binary Option trade in specified direction 60sec (or can also use 120sec trade without Martingale).
* Notes and Hints *
The original videos specified a Martingale money management strategy, be careful using this management. When I use Martingale I recommend go to 3 levels: 10, 25, 65 if no win at 65 stop trading this alert and start next alert back at 10, you should recovery loss by future wins given you are able to get a reasonable ITM rate with this strategy. Alternatively instead of using Martingale use 120sec Binary Option trade.
Be wary of break alerts on a steep Bollinger, they tend to keep running away for awhile, especially if steep on both sides of Bollinger channel.
As with most of this style of indicator the alert conditions will redraw until the candle is closed. For me this is okay, as it is an Alert is only to a potential trade and final decision to trade is made by me.
You need to practise this and be aware of market news, sessions boundaries, slow trading periods etc. Plan your periods of when you should trade, I prefer Asian session before lunch and London sessions.
Box Range AlertSimple Script for getting alerts on the crossing of Upper & Lower levels either way.
Good for Free users as they can only use 1 alert at a time. So this indicator will be useful to get alerts on both Breakout Or Breakdowns.
Just add input Price manually and set alerts.
HARD Top/Bottom Seeker v1 w/ alertsThis is the indicator (study) version of
Does not require tuning parameters , the same default settings used on all timeframes, all graphs work reasonably well.
Made a little change to the appearance and added alerts
Note that alert will sound on the opening of the candle where the signal is. (No late alerts)
No repainting.
General info: Prone to false positives. This is not a full strategy, but serves as a great "take profit" tool for those who are already in a trade and want to take profit as close to the top/bottom as possible.
Can also be used as the entry tool, but make sure you implement a stop loss.
Disclaimer: better example is selected here, the script DOES produce worse, EARLY/false positive signals, especially when a stronger trend is happening on the bigger timeframe than the script is used on.
Here's how to add an alert if you buy/rent this indicator: youtu.be
If you want it, PM. Price: $50/month
Cyatophilum MACD Hist [ALERT SETUP]Hello, I made a classic MACD Histogram indicator, with custom alerts and parameters though.
Shapes
Green circles : The MACD histogram is reversing, this is a buy (or Long) signal.
Red circles : The MACD histogram is reversing, this is a sell (or Short) signal.
Green Arrow up : The MACD histogram is enduring a bear fakeout. This is a buy signal.
Red Arrow up : The MACD histogram is enduring a bullfakeout. This is a sell signal.
Parameters ( INPUTS )
Classic MACD parameters.
Sensitivity : (1 = really sensitive to reverals and fakeouts - 5 = much less sensitive)
Activate Fakeouts : default is true. Uncheck to deactivate fakeout on chart /!\ will also deactivate fakeout alerts
Alerts (Automated trading alerts : SMS, email, etc.) that you can create :
Buy : a buy signal that will trigger on a bull reversal or a bear fakeout. No more than one buy/sell signal in a row (You will not get multiple buy signals or multiple sell signals in a row)
Sell : a sell signal that will trigger on a bearreversal or a bullfakeout. No more than one buy/sell signal in a row (You will not get multiple buy signals or multiple sell signals in a row)
Buy (Bull Reversal) : a buy signal that will trigger on each bull reversal.
Buy (Bear Fakeout) : a buy signal that will trigger on each bear fakeout.
Sell (Bear Reversal) : a sell signal that will trigger on each bear reversal.
Sell (Bull Fakeout) : a sell signal that will trigger on each bull fakeout.
If you like, leave a comment, thanks! If you find any bug, thanks for telling me!
-----------------------------------------------------------------------------------------------------------------
I am selling access to private scripts and backtests that can be found on my website .
I am also open to commissions : TradingView's PineScript development, reverse engineering.
Thanks.
RSI-CCI Fusion + AlertsThe "RSI-CCI Fusion" indicator combines the Relative Strength Index (RSI) and Commodity Channel Index (CCI) from TradingView.
RSI-CCI Fusion: Unlocking Synergies in Technical Analysis
Technical analysis plays a crucial role in understanding market dynamics and making informed trading decisions. I often rely on a combination of indicators to gain insights into price movements and identify potential trade opportunities. In the lines below, I will explore the "RSI-CCI Fusion" indicator, a powerful tool that combines the strengths of the Relative Strength Index (RSI) and the Commodity Channel Index (CCI) to provide enhanced trading insights.
1. Understanding the RSI and CCI Indicators
Before delving into the fusion of these indicators, let's briefly review their individual characteristics. The RSI is a widely used momentum oscillator that measures the speed and change of price movements. It oscillates between 0 and 100, with readings above 70 indicating overbought conditions and readings below 30 indicating oversold conditions.
On the other hand, the CCI is a versatile indicator designed to identify cyclical trends in prices. It measures the distance between the price and its statistical average, thereby providing valuable insights into overbought and oversold levels.
2. The Concept of RSI-CCI Fusion
The RSI-CCI Fusion indicator is born out of my desire to harness the collective power of the RSI and CCI. By combining these indicators, I can benefit from a more comprehensive trading signal that captures both momentum and cyclical trend dynamics.
The fusion process involves assigning weights to the RSI and CCI, creating a blended indicator that reflects their relative importance. The weighted combination ensures that both indicators contribute meaningfully to the final result.
To maintain consistency, the RSI and CCI values are standardized using the z-score technique. This normalization process brings the values to a common scale, making them directly comparable. Rescaling is then applied to bring the combined indicator back to its original scale, facilitating intuitive interpretation.
3. Interpreting the RSI-CCI Fusion Indicator
When plotting the RSI-CCI Fusion indicator on a chart, I gain valuable insights into market dynamics and potential trading opportunities. The indicator's plot typically includes dynamic upper and lower bands, which are calculated based on the indicator's standard deviation. These bands provide boundaries for evaluating overbought and oversold conditions.
When the RSI-CCI Fusion indicator crosses above the lower band, it suggests oversold conditions and potential buying opportunities. Conversely, when the indicator crosses below the upper band, it indicates overbought conditions and potential selling opportunities. I also pay attention to the baseline, which represents the neutral level and may signal potential trend reversals.
4. Utilizing Alerts for Trading Decisions
The RSI-CCI Fusion indicator can be further enhanced by incorporating alerts. These alerts notify me when the indicator generates buy or sell signals, enabling me to take prompt action. I can customize the alerts based on my preferred thresholds and timeframes.
However, it is crucial to remember that the RSI-CCI Fusion indicator should not be relied upon in isolation. To increase the robustness of my trading decisions, it is recommended to combine the indicator with other analysis techniques such as trend lines, support and resistance levels, or additional indicators. This convergence of analysis methodologies enhances the overall accuracy of my trade signals.
Conclusion: The RSI-CCI Fusion indicator represents a compelling approach to technical analysis by synergizing the strengths of the RSI and CCI. By combining momentum and cyclical trend dynamics, I gain a more comprehensive view of market conditions. The fusion of these indicators, accompanied by timely alerts, equips me with valuable insights and facilitates well-informed trading decisions.
As with any technical analysis tool, it is essential for me to backtest the RSI-CCI Fusion indicator to evaluate its performance across different market conditions and timeframes. Additionally, applying proper risk management strategies is crucial to ensure consistent and disciplined trading practices.
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 .
% 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%下降したらアラートがトリガーされます。
[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.)
Renko Chart Alerts with PivotsAdd alerts to renko charts to be notified when:
new brick
brick up
brick down
direction change
direction change up
direction change down
Also shows pivots based on brick reversals. Alerts also available for:
pivot breakout
pivot high breakout
pivot low breakout
You can hide the plots for pivot high/low and breakouts in the style tab of the settings for the indicator.
To add the alerts:
add the indicator to your renko chart
click add alert
click the condition dropdown and choose Renko Alerts
you should see all the alerts there and you can add any one or more to your chart
Variable Alert Box Examplejust publishing to share to novice pine coders like myself
any feedback on layout/structure/shortcuts will always be appreciated, not that this is a long script with much that can go wrong
short little what ever to show variable alert message
needs to draw the number from a plotted number like line 18 and 19, and cant be gettin the numbers from line 14 and 16