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!
Alert
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 !
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.
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.
Pivot Points on SR lines DEMOAnalyzing price movements for a few years taught me one thing - markets always reverse bouncing off some horizontal Support/Resistance level. The only exception to this rule is when market pops new ATH (All Time High), which certainly happened in so-called "price discovery" run - this asset has never been in this space before, so no Support/Resistance could have been formed, while the rally had to stop at some point anyway.
In all other cases, analyzing past market movements, you will be able to find a place where the market reversed or gathered before. The difficulty is to understand (or guess?) from which S/R level market will reverse right now, because there are many of them. Even if this is probably not possible to make such guess correctly and always, it is good to know when potential reversal shown by whatever indicator you're using happened on SR line or in the middle of nowhere. That last case would turn out to be fake to your worst regrets. Ability to filter-out all those fake pivots is a value my indicator delivers.
Example? It is very often considered an entry signal when Stochastic %K and %D lines cross each other, especially in overbought/oversold area. It could work quite well in sideways markets, but when a trend begins, Stochastic would report CONSECUTIVE counter-trend signals, draining your trading balance to zero quickly. But this trend took place in price-discovery area (not necessarily when going for the new ATH ), so all those counter-trend signals happened not at S/R levels. Hence, they should be ignored.
Big triangles mark pivot point which happened on the S/R line. Small triangles - in the middle of nowhere.
How good is it? I compared it with one of my previous scripts, the "PivotPoints with Momentum confirmation" (), this new script confirms only 1/3 of pivots in the old script on 1m EURUSD chart. Filtering out 2/3 of potentially bad entries is a good result, I'd say :)
This script also fires alerts - alert is triggered as soon as PivotPoint is noticed, on a candle close.
I strongly recommend NOT using it not using this indicator as a standalone indicator. There is so much information you should take into consideration as well - market bias, volume , higher timeframe trend... To make it convenient to join PivotPoints information with other indicators, I have "exported" one plot so you can include it in your own - just use input.source in your own code to have it return 1 for PivotLow ( aka Long entry) and -1 for PivotHigh ( aka Short entry).
Consecutive Up/Down Strat + 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 15.
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.
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.
Custom Volume - Periodic Peaks & Troughs + AlertThis script is a custom volume indicator with additional features.
But why is this useful?
The minimum and maximum volumes, in different time periods, are displayed by labels below the bars. I call them "Peaks" and "Troughs".
Hover your mouse cursor over the labels to see more details.
These parameters are widely used in technical analysis.
If traders want to confirm a reversal on a level of support–or floor–they look for high buying volume. Conversely, if traders are looking to confirm a break in the level of support, they look for low volume from buyers.
If traders want to confirm a reversal on a level of resistance–or ceiling– they look for high selling volume. Conversely, if traders are looking to confirm a break in the level of resistance, they look for high volume from buyers.
For example, take a look at the chart.
Settings menu parameters
{Dialog Box} =>
Parameter to show / hide the dialog box.
{Visual Parameters} =>
Parameters to personalize the appearance of the indicator.
{ Alert Conditions Part 01: Peaks ⏰ "} =>
Parameters to customize the alert.
{ Alert Conditions Part 02: Troughs ⏰ "} =>
Parameters to customize the alert.
{Volume MA} =>
Moving average settings
How to use alerts
Note that by creating an alert, an instance of the indicator, with all your settings, will be activated on the site's server and alerts will be triggered by it.
After that, changing the indicator settings on the chart will no longer affect the alert.
Open the settings window and select the alert conditions as you wish
Click the Create Alert button (or press the A key while holding down the ALT key)
In the Condition section, select the name of the indicator.
Make the rest of the settings as you wish.
Finally, click on the Create button.
It's finished. After a few moments, your alert will be added to the Alerts menu.
Limits
The labels are displayed after the bars close.
Labels are displayed for the last 10,000 bars.
References: Investopedia
Moving Stop-Loss mechanism + alerts to MT4/MT5"How to code moving stop-loss mechanism", is one of the most often repeating questions in private messages I receive, so just to focus on this mechanism, I made a spin-off from my previous script: TradingView-Alerts-to-MT4-MT5-dynamic-variables-NON-REPAINTING .
The logic here moves the stop-loss each time a trade is running and a new pivot high/low is detected. When such event occurs (UpdateLongStopLoss or UpdateShortStopLoss), stoploss_long or stoploss_short mutable variable is modified. And it needs to be coded inside strategy.exit() line as "stop=stoploss_long" or "stop=stoploss_short". Entries are pretty straightforward - on Stoch crosses.
Last lines of the script show how to wrap information about such updates and send send alerts to MetaTrader via TradingConnector for execution in Forex/indices/commodities/crypto markets via MetaTrader. Please note that "tradeid=" variable must be passed with each alert, to let MetaTrader know which trade to modify. SLMOD, TPMOD are recently added commands, along with BE (as in "move stop-loss to breakeven" - but that's another topic).
Please disregard strategy backtest results, as this script is for coding education purposes only. However, it seems with the stop-loss mechanism enabled, the results are even better, than in original version of the script :)
Smart AlertsThis indicator provides back-tested signals and alerts from multiple technical indicators.
No more guessing whether or not you should trust an indicator. See your indicators' past performance at a glance.
No more false alarms. Disable re-painting of signals.
When multiple indicators overlap, a Confluence indicator will print (large triangle). With your settings properly tuned, this will show a HIGH probability of a move.
Current Signal/Alert Options (more to come):
RSI Oversold
RSI Overbought
EMA Crossing Up
EMA Crossing Down
Buy Signal Confluence
Sell Signal Confluence
Instructions:
-Enable/disable individual indicators so you can fine tune one at a time
-Adjust the indicator's settings
-Adjust your trade parameters (Max Wait, Take Profit %). Signals that would have given the desired profit in the time allowed will be painted orange.
-Repeat this process with each indicator until you're satisfied
-Set-up alerts
AlertoJack AlertoJack
v0.1a
coded by Bogdan Vaida
This indicator was created to provide easily defined alerts on multiple symbols.
It's still POC code.
Usage:
- Add it on any coin,
- The chart timeframe will be the timeframe for the alerts;
- Configure it with the symbols you want to be alerted on,
- Add the prices to be alerted for,
- Use Add Alert -> condition AlertoJack -> "Any alert() function call"
- Check the Alerts log.
Notes:
- Alert happens when candle crosses the price.
- Because of how Trading View functions, if you modify the indicator settings
you'll need to add the alerts again (because an alert uses the code version
it was created from).
- The alert runs once per current bar's timeframe (e.g. once per minute
if you're on the 1m).
RSI ExtendedThis script is intended to print signals on the main price chart and send alerts when the RSI is overbought or oversold.
You can customize the source of the signal (open, close, etc), as well as oversold/overbought levels, and RSI length.
Stochastic RSI w/ Crossover Alerts (by WJ)NOTE:
// STOCH RSI CODE TAKEN FROM DEFAULT INDICATOR
// I HAVE ONLY MADE SOME ADJUSTMENTS FOR VISUAL AID
// I MADE THIS FOR MY OWN USE BUT HAVE DECIDED TO PUBLISH AND SHARE IN CASE ANYBODY WANTS TO USE IT
This is the normal default built-in Stochastic RSI indicator which I have added some stuff for visual aid:
Added middle line (50)
Stoch RSI background turns green when K line crosses D line UPWARDS, K line is below the 50 level, and price is above 200 EMA
Stoch RSI background turns red when K line crosses D line DOWNWARDS, K line is above the 50 level, and price is below 200 EMA
Alert notification on the crossover candle with background colour change conditions met
Relative Strength Index w/ 3 Levels & 0 Line Colour (by WJ)NOTE:
// RSI CODE TAKEN FROM DEFAULT INDICATOR
// I HAVE ONLY MADE SOME ADJUSTMENTS FOR VISUAL AID
// I MADE THIS FOR MY OWN USE BUT HAVE DECIDED TO PUBLISH AND SHARE IN CASE ANYBODY WANTS TO USE IT
This is the normal default built-in RSI indicator which I have added some stuff for visual aid:
Added middle line (50)
RSI turns green when crossed above 50
RSI turns red when crossed below 50
RSI background turns green and red on crossover candle based on whether RSI just crossed over or below 50 respectively
Alert notification on the crossover candle
MultiAlert LITEAllows one to set 5 price level alerts on one symbol (1 Stop Loss 4 Targets)
Alerts work by prices crosses under the stop loss or over the targets, enabling short reverses this.
Unlike regular MultiAlert, this actually draws a true horizontal price at your price.
This is a lighter version of MultiAlert, supporting only one symbol. Your price levels will appear on all charts unless you hide the indicator.
Make the alert with targets and stop loss set, every time you make a change you MUST REMAKE THE ALERT.
Please comment any problems .
MultiPrice AlertThis is an alert script using Pinescript version 4. This enables one to set 5 alerts (1 StopLoss, 4 Targets), on 3 different symbols, at using a single alert in the UI.
Every visible line will only appear on the symbols that are selected. After setting targets when making an alert, select this indicator as a condition. Change the name to whatever you want, usually the names of the set of tickers.
The Alert message is dyanmic showing which Symbol with each type of alert, at whatever price.
Ability to disable the targets + symbols.
Alerts work by Stop Loss crossing under price and Targets Cross Over. Enabling the "Short" Targets reverses this.
The line that is being displayed is actually the price of the asset being moved over x number of bars. I have not found a way to plot a traditional horizontal line, as the code for it uses a fixed price.
As it being a user input, it is a variable. Any help with this would be appreicated.
Alerts are set to once per bar.
Known bug that sometimes if the prices that you set are inside the current candle stick, then your alert will immeaditally fire, either change the timeframe or let it fire and wait fo
After a target is hit, I reccomend setting the alert to 0 and REMAKING the alert. You MUST REMAKE THE ALERT AFTER ANY CHANGES. This script WILL NOT CHANGE ALERTS AS YOU CHANGE SETTINGS.
TradingView Alerts are not this smart , at least I haven't found a way to do this yet.