Multiple Screeners with AlertsI already published few version of my custom screeners. Unfortunately, because of TradingView's security function call limit you can't use more than 40 stocks in 1 screener.
Fortunately, you can compute multiple values in your function and screen few indicators at once.
In this script I show how you can compute 5 indicators at the same time for 40 instruments. I display then in different labels.
Every label consist of list of instruments satisfying current indicator conditions and a value for it. It can be absolute value as for RSI or -1/1 representing Bullish/Bearish event.
Also you can create 1 alert with result of all screeners inside.
In this example I took 5 indicators with following conditions:
RSI - "RSI < 30" or "RSI > 70"
TSI - "TSI < -30" or "RSI >30"
ADX - "ADX > 40"
MACD - "MACD Bullish Cross" or "MACD Bearish Cross" (1 and -1 in screener)
AO - "AO Crosses 0 UP" or "AO Crosses 0 DOWN" (1 and -1 in screener)
Params
- bars_apart - this parameter define how may bars apart you labels are on your chart. If you see labels overlapping, increase this number.
- Parameters for all used indicators
- 40 symbol inputs for instruments you want to use in this screener
Alerts
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 is generated in the code.
You should better change default name for your alert. Sometimes because of big amount of inputs you might receive an error.
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.
在腳本中搜尋"macd"
Elder-Keltner-Impulse-MA Study by STTAStudy Name: Elder-Keltner-Impulse-MA Study by STTA
English:
This indicator shows in a combined way three Keltner Channels with EMA21 and multiplier 1,3,5, the Elder Impulse System and a short EMA 11 to recognize the valuation zone, according to various strategies of Dr. Alexander Elder.
This indicator can be applied on all symbols.
Inputs: displayed symbol
Settings:
Elder Force Index (EFI)
-EIF MACD Length
-EIF MACD Slow Length
-EIF MACD Signal Length
-EIF EMA Length
EMA Short Length
Keltner Channels (KC)
-KC MA Length
-KC Multiplier1-3
-KC Source
-KC Type
-KC Bands Style
Outputs:
-EIF Bar Colors
-KC Upper1-3 channel upper and lower Lines
-MA Short
MACD StrategyThis script sends buy and sell signals as alerts to 3Commas (online software with trading bots in cryptocurreny)
It's based on 2 indicators:
- MACD
- 12 EMA and 26 EMA
When the 12 EMA and 26 EMA crossover, the MACD line crosses above 0. The goal here is to look for buy signals when the MACD and Signal are below 0, the histogram is positive, and there was or will be a 12 EMA and 26 EMA crossover.
I struggle with the following:
- There are multiple ways to use this as a crossover signal. I want to calculate the win rate of every posibility.
- What should be my take profit and my stoploss?
I think a 2:1 R/R,and a 60% win rate would make a great strategy! I could use some advice.
DMA: Moving Average of OscillatorTechnical Indicator Moving Average of Oscillator (Moving Average of Oscillator OsMA) is the difference between the oscillator and oscillator smoothing. In this case, an oscillator is used the basic MACD line and the smoothing of the signal.
Calculate:
OSMA = MACD - SIGNAL
MACD = EMA(CLOSE, 12) - EMA(CLOSE, 26)
SIGNAL = EMA(MACD, 9)
Trend Checker by Hally - IndicatorIt is an indicator that overlaps MACD and Stochastics.
It has both characteristics.
The trend changes when two lines intersect.
I think the reaction is bad in the range market.
Also, when there are Stochastics and MACD lines above the indicator, it is possible to think whether it is overbought while riding the trend, and it may be helpful for making decisions such as "maybe it will reverse soon". Hmm.
Also, I think it is better to use it in combination with other indicators.
This is my first pine script, and I couldn't find it even if I searched for the script with overlapping indicators of different scales, so I tried making it by trial and error.
I hope it helps somebody trying to do the same.
MACDとStochasticsを重ね合わせたインジケーターです。
それぞれの特徴を併せ持っています。
2本のラインが交差する時トレンドが変化します。
レンジ相場では反応が悪いと思います。
また、インジケーターの上の位置にStochasticsとMACDラインがあるときはトレンドに乗りながらも買われすぎかどうか考えられることが出来ますし、「そろそろ反転するかも」などの判断の助けになるかもしれません。
また、他の指標との併用して使うほうが良いと思います。
pineスクリプトは初めてで、異なるスケールのインジケーターを重ね合わせていスクリプトは探しても見つからなかったので試行錯誤で作ってみました。
同じようなことをやろうとしてる誰かの参考になれば幸いです。
MACD Trend Squeezer V2This is a combination of a slightly sped up MACD overlay on top of a modified Bar Trend Squeeze or highly modified Momentum indicator. Helps to see the trend/momentum matched with the characteristics of the MACD and it's historiography. Very user friendly for adjusting color, transparency, depth, lines, size, etc.
MACD is the dark gray line.
Its signal slower line is orange.
Its historiography is the area fill blues and reds
Trend Squeezer / momentum are the Bars in the background.
// Changes from original version \\
Visual depth mostly. Most of the items are adjustable in the settings.
Increased user friendly inputs to adjust colors, lines, data, etc.
(darken / lighten and change background bar colors, increase/decrease line strengths and colors, adjust field data inputs)
MACD Zero lag impulse systemThis version of impulse uses the double exponential moving average instead of the typical ema.
The impulse system :
The Impulse System combines two simple but powerful indicators.
One measures market inertia, the other its momentum. When both
point in the same direction, they identify an impulse worth following.
We get an entry signal when both indicators get in gear.
The Impulse System uses an exponential moving average to find
uptrends and downtrends. When the EMA rises, it shows that inertia
favors the bulls. When EMA falls, inertia works for the bears. The sec-
ond component is MACD-Histogram, an oscillator whose slope reflects
changes of power among bulls or bears. When MACD-Histogram rises,
it shows that bulls are becoming stronger. When it falls, it shows that
bears are growing stronger.
The Impulse System flags those bars where both the inertia and the
momentum point in the same direction. When both the EMA and
MACD-Histogram rise, they show that bulls are roaring and the uptrend
is accelerating.
MACD + Stochastic + RSI (Long + Short)My strategy uses a combination of three indicators MACD Stochastic RSI .
The Idea is to GO LONG when ( MACD > Signal and RSI > 50 and Stochastic > 50) occures at the same time
and GO SHORT when ( MACD < Signal and RSI < 50 and Stochastic < 50)
This strategy works well on futures and stocks especially during market breaking up after consolidation
The best results are on Daily charts , so its NOT a scalping strategy. But it can work also on 1H charts.
The strategy does not have any stops and profit targets, so we can take all the market can give us at the moment.
The exit point only when MACD goes under/over Signal line
Its Preformance is quite stable.
So, use it, trade it.
If it will help you to imprive your trading results, please donate me
BTC: 12kd1F8buWisUBdq27BBwRkUvzW7Ey3og5
MACD + Stochastic + RSI StrategyMy strategy uses a combination of three indicators MACD Stochastic RSI.
The Idea is to buy when (MACD > Signal and RSI > 50 and Stochastic > 50) occures at the same time
This strategy works well on stocks and cryptos especially during market breaking up after consolidation
The best results are on Daily charts, so its NOT a scalping strategy. But it can work also on 1H charts.
The strategy does not have any stops and profit targets, so we can take all the market can give us at the moment.
The exit point only when MACD goes under Signal
Its Preformance is quite stable.
So, use it, trade it.
If it will help you to imprive your trading results, please donate me
BTC: 12kd1F8buWisUBdq27BBwRkUvzW7Ey3og5
MACD DEMA STRATEGY A strategy based on ToFFF MACD DEMA indicator
Even so , ı dont recommended using MACD DEMA alone.
Combine its code with your favorite indicators.
You can visit ToFFF's indicator :
SB_CM_MacD_Ult_MTFThis strategy places the order based on the MACD signal.
Original Indicator: MacD Custom Indicator-Multiple Time Frame+All Available Options! by ChrisMoody
Link to the Indicator:
If your risk appetite is high you can replace the first statement with the below statement:
strategy(title="SB_CM_MacD_Ult_MTF", shorttitle="SB_CM_MacD_Ult_MTF", default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 5)
You can check for repainting. Did not check for that.
Message if you think of any modifications/ enhancements/ any opportunities. :)
Donations/Tips... :) -
BTC: 1BjswGcRR6c23pka7qh5t5k56j46cuyyy2
ETH: 0x64fed71c9d6c931639c7ba4671aeb6b05e6b3781
LTC: LKT2ykQ8QSzzfTDB6Tnsf12xwYPjgq95h4
MACD/CAM 2.1
Added some modifications to Chris Moody's Macd indicator
Made fast length, slow length and signal length 5, 8, 3
Put initial capital of $2k
Buy at MACD/signal crossover
Sell at signal/MACD crossunder or when day low < previous day low
Open for feedback
MACD MAthis indicator is to be able to predict the movement of the macd, to determine when the macd may overextend and also provides great support and resistance levels, it's made out of 2 exponential moving averages one being 12 and the other 26, just like the moving averages used by the determine the macd a cross of the lines may indicate buy or sell signals
Normalized Moving Average Convergence/DivergenceThis MACD normalizes the price so that it can be compared against moves that took place at prices of significant difference.
There are also options to change if the MACD and the signal line are computed using EMA or SMA.
Oscillator Moving Average (OsMA)This code for Oscillator of Moving Averages (OsMA) is based on MACD 4C indicator code published by vkno422 . Many thanks to vkno422. I have borrowed the concept of 4 colours which I find very useful.
For those who are not familiar with OsMA, it is histogram of difference between MACD (oscillator) and its MA (signal line). The zero line cross over of this indicator is used in many strategies.
This version includes MACD & its signal line together with OsMA histogram. I have programmed flexibility for switching OFF/ON individual indicator components as well as changing the periods for various moving averages.
I am dedicating this indicator to the TV trading community hoping that people will find it useful.
Momentum-Based Buy/Sell SignalsBuy Signal:
Triggered when ROC > threshold and the MACD line crosses above the Signal line.
Sell Signal:
Triggered when ROC < threshold and the MACD line crosses below the Signal line.
Visual Elements:
Green labels with "Buy" are displayed below the bars for buy signals.
Red labels with "Sell" are displayed above the bars for sell signals.
The background turns green during a buy signal and red during a sell signal for better visual clarity.
Chande Momentum Oscillator (CMO) Buy Sell Strategy [TradeDots]The "Chande Momentum Oscillator (CMO) Buy Sell Strategy" leverages the CMO indicator to identify short-term buy and sell opportunities.
HOW DOES IT WORK
The standard CMO indicator measures the difference between recent gains and losses, divided by the total price movement over the same period. However, this version of the CMO has some limitations.
The primary disadvantage of the original CMO is its responsiveness to short-term volatility, making the signals less smooth and more erratic, especially in fluctuating markets. This instability can lead to misleading buy or sell signals.
To address this, we integrated the concept from the Moving Average Convergence Divergence (MACD) indicator. By applying a 9-period exponential moving average (EMA) to the CMO line, we obtained a smoothed signal line. This line acts as a filter, identifying confirmed overbought or oversold states, thereby reducing the number of false signals.
Similar to the MACD histogram, we generate columns representing the difference between the CMO and its signal line, reflecting market momentum. We use this momentum indicator as a criterion for entry and exit points. Trades are executed when there's a convergence of CMO and signal lines during an oversold state, and they are closed when the CMO line diverges from the signal line, indicating increased selling pressure.
APPLICATION
Since the 9-period EMA smooths the CMO line, it's less susceptible to extreme price fluctuations. However, this smoothing also makes it more challenging to breach the original +50 and -50 benchmarks.
To increase trading opportunities, we've tightened the boundary ranges. Users can customize the target benchmark lines in the settings to adjust for the volatility of the underlying asset.
The 'cool down period' is essentially the number of bars that await before the next signal generation. This feature is employed to dodge the occurrence of multiple signals in a short period.
DEFAULT SETUP
Commission: 0.01%
Initial Capital: $10,000
Equity per Trade: 80%
Signal Cool Down Period: 5
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
OneThingToRuleThemAll [v1.4]This script was created because I wanted to be able to display a contextual chart of commonly used indicators for scalping and swing traders, with the ability to control the visual representation on the charts as their cross-overs, cross-unders, or changes of state happen in real time. Additionally, I wanted the ability to control how or when they are displayed. While looking through other community projects, I found they lacked the ability to full customize the output controls and values used for these indicators.
The script leverages standard RSI/MACD/VWAP/MVWAP/EMA calculations to help a trader visually make more informed decisions on entering or exiting a trade, depending on their understanding on what the indicators represent. Paired with a table directly on the chart, it allows a trader to quickly reference values to make more informed decisions without having to look away from the price action or look through multiple indicator outputs.
The main functionality of the indicator is controlled within the settings directly on the chart. There a user can enable the visual representations, or disable, and configure how they are displayed on the charts by altering their values or style types.
Users have the ability to enable/disable visual representations of:
The indicator chart
RSI Cross-over and RSI Reversals
MACD Uptrends and Downtrends
VWAP Cross-overs and Cross-unders
VWAP Line
MVWAP Cross-overs and Cross-unders
MVWAP Line
EMA Cross-overs and Cross-unders
EMA Line
Some traders like to use these visual indications as thresholds to enter or exit trades. Its best to find out which ones work the best with the security you are trying to trade. Personally, I use the table as a reference in conjunction with the RSI chart indicators to help me decide a logical trailing stop if I am scalping. Some users might like the track EMA200 crossovers, and have visual representations on the chart for when that happens. However, users may use the other indicators in other methods, and this script provides the ability to be able to configure those both visually and by value.
The pine script code is open source and itself is fairly straightforward, it is mostly written to provide the ultimate level of control the the user of the various indicators. Please reach out to me directly if you would like a further understanding of the code and an explanation on anything that may be unclear.
Enjoy :)
-dead1.
Divergence for Many [Dimkud - v5]Strategy is based on "Divergence for Many Indicators v4 ST" strategy by CannyTolany01
which is based on "Divergence for Many Indicator" indicator by LonesomeTheBlue
This strategy is searching for divergences on 18 indicators which you can select and optimise one by one.
Additionally you can connect any other External Indicator value. (just add this indicator the the chart and select option in settings)
To the original indicator/strategy I have added 9 additional indicators:
( Money Flow Index, Williams_Vix, Stochastic RSI , SMI Ergodic Oscillator, Volume Weighted MACD , Bull Bear Power, Balance of Power , Relative Volatility Index , Logistic Settings).
Converted strategy to v5 of Pine Script.
Added Static SL/TP in percents (%).
Added filters to filter enters:
1. Volume Weighted MACD - Multi-TimeFrame Filter
(It checks for histogram to falling or rising for a set periods of bars)
2. Money Flow Index - Multi-TimeFrame Filter
(It checks if MFI Oscillator is in the set diapason.
Also It checks if MFI is falling or rising for a set periods of bars )
3. ATR filter
(check changes in fast ATR to slow ATR )
Strategy shows good backtest results on many crypto tokens on 45m - 1h periods. (with parameters optimisation for every indicator)
To find best parameters - you can enable indicators one-by one, and optimise best parameters for each of them.
Then enable all indicators with successful results.
Optimise SL/TP.
Then try to enable and optimise filters (channels etc.)
The better is to optimise parameters separately for Short and Long trading. And run two separate bots (in settings enable only Long or only Short.)
Updates:
- Added visualisation for open trades (SL/TP)
- Added Volatility filter by ATR with many options for tests.
- Fixed some small bugs.
- Added second RSI filter (you can use two RSIs with different TF or settings)
- Updated ATR volatility and MFI filter. Removed non-effective options
- Added CCI filter
- Added option to Enable/Disable visualisation of TP/SL on chart
- Fixed one small quick bug. ("ATR filter short" was not working)
- Added Super Trend filter
- Added Momentum filter
- Added Volume Filter
- All "request.security" MultiTimeFrame calls changed to 100% non-repait function "f_security()"
Universal Moving Average Convergence DivergenceI changed MACD formula to divergence of (MA26/MA12 - 1).
And its make it more useful.
Cuz:
1) comparability with all other coins with different prices.
2) fix small numbers in low price coines like shiba
3) making a good indicator like RSI to use it for optimization and ML/AI projects as a variable
Most important thing about this indicator is that its Universal
Now you can compare the UMACD of Shiba with Bitcoin without any problem in matamatics space.No need to use virtuality and its important in Optimization problems that we rediuse the problem from a picture to a number(A plot to a list of numbers)
If we don't care about exagrated pumps and dumps, we can say to it Normalized-MACD too. Cuz in normal situations its MAX ≈ 0.1 and MIN ≈ -0.1
Percentile Rank of Moving Average Convergence DivergenceThis simple indicator provides you three useful information of the Moving Average Convergence Divergence (MACD) indicator:
The percentile rank of the current value of the MACD line, displayed by the bright blue line.
The percentile rank of the current value of the Signal line, displayed by the dark blue line.
The percentile rank of the current value of the Histogram line, displayed by the olive histogram.
This indicator can be useful to identify the strength of trend. This indicator makes the assumption that market tends to revert into the opposite direction. If the market has been trending a lot, it should consolidate for a while later. If the market has been consolidating for a long time, it would begin trending real soon.
When we see a low percentile rank, no matter which line it is, this tells that the market hasn't been moving much, or there is little momentum. If the percentile rank stays below the median or even below the first quartile for a long time, this could suggest that the market is ready for the next trend since it has stored quite some energy.
When we see a high percentile rank, no matter which line it is, this tells that the market has been trending a lot, or there is much momentum. If the percentile rank stays above the median or even above the third quartile for a long time, it is probable that the market has used up much of its energy and is going to take a rest (consolidate).
MACD StrategyBTCUSD -- 5 min
BUY POSITION
1 : The price is above the EMA
2 : The macd line crosses above the line signal below 0
SELL POSITION
1 : The price is bellow the EMA
2 : The macd line crosses below the signal line above 0
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