NSDT HAMA CandlesHAMA (Heiken-Ashi Moving Average) Candles are built using different moving average lengths for the open, high, low, and close. Those levels are then run through the Heiken-Ashi Candle formula to create a new hybrid candle on the chart. There is an additional Moving Average plotted as well for overall direction.
This may be used best for identifying trending markets. By referencing the HAMA Candle indicator, it may help guide you to stay in a trade a bit longer, or wait a bit longer before entering at the beginning of a potential trend.
We added a Gradient Color scheme option for a more colorful view of potential trend directional changes. The gradient code is taken from the Pinecoders Gradient Framework (Pro Advance/Decline Gradient example) at
There are three different Moving Average types to choose from. (EMA, SMA, WMA). All MA lengths can be modified. All colors can be modified. All options can be turned on or off.
This was previously an "invite-only" indicator, but we decided to publish it publicly and open source.
Exponential Moving Average (EMA)
MACD_STO-SAMI
This indicator depends on the trend. You must first determine the general trend and then wait for the signals that indicate buying in the bullish direction and the signals that indicate selling in the bearish direction, which is the green signal is considered buying and the red signal is considered selling
Also, this indicator differs from the rest of the indicators that the signal is prior to the movement of hair, meaning that it is predictive and is strong.
The green bar is the buying peak.
The red bar is oversold.
The red arrows indicate that you can sell, but the price must be monitored.
The green arrows indicate that it is possible to buy and monitor the price
The colored candles are 4, and each candle indicates the order of the candle.
1- The blue candle indicates a change in the bearish trend and the possibility of it changing to an upward trend.
2- The green candle, which indicates that there will be acceleration in the upward direction.
3- The yellow candle indicates a change in the upward trend and the possibility of it changing to the downside.
4- The red candle indicates that there will be acceleration in the downside direction
To help determine the trend, the average of the 50 simple has been set
NYSE:BA
FX:GBPUSD
TADAWUL:1120
BINANCE:BTCUSDT
EMA deviationssuper basic, % deviations around an EMA
will update later
published so i dont have to type this up everytime i open a chart
Moving Average CombinationsThis moving average indicator is used to plot either EMA or SMA as per users choice. User also has the options to choose different type of sources for each of the moving average lines like high, low, close etc. Again, flexibility is added to plot moving averages of different timeframe than the current timeframe of the chart. By doing so in daily chart user can plot averages of different timeframe like hourly, weekly or monthly and vice versa. Length is also as per the choice of the user.
So for a example, in a daily timeframe chart you can plot 9SMA High Daily, 200EMA Close 1Hr, 200EMA Close 2Hr, 200EMA Close Daily, 9SMA High Weekly and so on. This will help in play moving average crossovers and contractions.
Label for each moving average line is also added.
3 EMA/SMA + Colored Candles[C2Trends]// Indicator Features:
// 1) 3 Exponential Moving Averages and 3 Simple Moving Averages.
// 2) Additional EMA input for colored candles(EMA is hidden from chart, input used for coloring of candles only)
// 3) Turn colored candles on/off from main input tab of indicator settings.
// 4) Turn SMA's and EMA's on/off from main input tab of indicator settings.
// 5) Select single color or 2 color EMA and SMA lines from main input tab of indicator settings.
// Indicator Notes:
// 1) 'Candle EMA' input is the trend lookback period for the price candle colors. When price is above desired Candle EMA, price candles will color green. When price is below the Candle EMA, price candles will color fuchsia.
// 2) If you are using another indicator that colors the price candles it may overlap the candle colors applied by this indicator. Trying hiding or removing other indicators to troubleshoot if having candle color issues.
// 3) Using 2-color price moving averages: when price is above an average the average will color green, when price is below an average the average will color fuchsia.
5min Williams Fractals scalping (3commas)Another strategy I'm learning Pine Script on. It is inspired by a MoneyZG youtube strategy called "Easy 5 Minute Scalping Strategy (Simple to Follow Scalping Trading Strategy)".
Again this is a one order per trade strategy compatible with the 3commas bot (works also with the free 3commas subscription). This strategy is based on the signals from Williams Fractals, taking the signals in reverse - red triangle indicates a bottom and hence we go long. The green triangle indicates a top so we go short. By default these signals are only accepted if they occur between the two Emas. However, you can also turn this off and when a WF signal comes in, only the current price has to be between the Emas. Stop loss is set to the current Ema slow and the take profit is a multiple of the distance to the slow ema.
Like previously I have added different filters as well as the ability to view essential things like the WF signal and Emas. I hope the script will help you to be more successful and if so it would be great if you could share here your setups, or tips on what would be good to refine to make it an even a more profitable strategy. Kind of a community approach so that we help each other out :).
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest.
6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
In the near future I would like to publish more scripts that will carry similar elements as the first two, incl. compatibility with 3commas (I don't have access to another bot system). I will choose some strategies myself, but I will also be glad for some tips on what strategy would be good to do and is still missing here on Tradingview (short youtube videos or brief strategy manuals would be great).
Thanks and keep it up
PS: My screen values starting at Long Target Profit and ending at Pullback NOT greater than: 1.5; 1.5; 0; ON; 1; 2; OFF; 17; 36; ON; 0.05; ON; Chart; 14; 46; 50; 48.5; 51; OFF; 1; ON; 4; 2.
Higher TF Moving AveragesScript showing up to 5 different Moving Averages of a Higher Timeframe.
User can select the MA type (EMA or SMA) and its length.
Default are 10, 20, 50, 100 and 200 period SMAs.
The script will also plot optional labels with price display.
All plots and color are configurable.
EMA 5/10/150/200This is a simple script with EMA 5/10/150/200. You can also change the source code and set the desired values of the EMA indicator.
3 Indicator Strategy (StochRSI, MFI & EMA) With Safety OrdersThis strategy uses Stochastic RSI, Money Flow Index and EMA with settings for lower time-frames.
It also features safety orders based on 3 different take profit and stop loss methods.
Recommended Indicator Settings for lower time-frames;
Stoch RSI: 1,1,100,100
MFI: 30
EMA: 100
Take Profit/Stop Loss Settings:
There are 3 TP/SL types available;
- Pips -> based on minticks
- Base Value -> manually entering a value for the actual profit/loss.
- Opposite Signal -> e.g. if the current open order is long, strategy waits for the next short signal.
EMA/MA Cross + BB + Alerts Short hand notes - I made this for friend and I. Unsure how to share it with him so made it public.
u/ tmyerskerry for the math on slope and look back period (look back period isn't perfect for slope calculation as 200ma is slow moving so some signals are goign to be strong instead of weak and visa versa. If you know a better way than i'm all ears!
Can set mutliple EMA's and MA's.
Default BB built in. Couldn't figure out how to set default shadow transparency so you will have to turn it down.
Added red and green lines that indicate when price has gone above and below the BB shadow.
Added arrows for when EMA1 crosses EMA2. Right now set for 9 + 32. And depending on MA200 color changes if its with the trend or against.
Alerts in the works. (please don't ask for them as i'm doing this part time and don't know pinescript)
Moving Averages Different Type & SourceThis is a indicator to plot moving averages. User has the option to choose whether to plot SMA (simple moving average) or EMA (exponential moving average). Length of the averages also can be changed by user. The main feature also is use of different source for different length of MAs. Like you can plot 9SMA High with 20EMA Close etc. So, you can plot different types of combinations with type of MA (sma and ema) and Source type (high, low, open, close etc.).
A table also added in the right top to show the values of MA in selected timeframe. The red color indicate current price is below that ma and green color indicate current price is above that ma. Same feature added in plot of ma line by checking toggle color feature option on. It will show green color ma when price is above it and red color ma lines when price is below it.
[Multi-layers][VDT]New multi-indicator to merge together three of the most popular indicators used by traders in technical analysis:
1) Ichimoku Cloud, with parameters editable by the trader. Default parameters are: 9-26-52-26
2) 3X Simple Moving Average (SMA), with periods editable by the trader. Default periods are: 20-50-200
3) 3X Exponential Moving Average (EMA), with periods editable by the trader. Default periods are: 7-60-200
Traders can decide whether to print or to hide each indicators separately in the graph, creating three different overlays.
10X Moving Average Dingue V510X Moving Averages into 1 indicator - This is the updated V5 for PineScript 5
This moving average indicator lets you quickly visualize what is happening with the price.
Color-coded for easy visualization of all 10 MAs at the same time.
Fill in colors that let you see expansion and contraction between MAs and also if MAs are above or under each other plus if they are rising or falling.
10 Different Moving Averages give you full control over how you trade. You can have many long-term trends, mixed in with short-term MA. You can mix and match MA types to give a better idea of what other traders might see, important levels, etc… You can select from a wide range of MA Type: 'SMA', 'SMMA', 'EMA', 'DEMA', 'TEMA', 'WMA', 'VWMA', 'KAMA', 'FRAMA', 'TRIMA', 'ALMA', 'HMA', 'LSMA', 'ZLEMA', 'ViDYA', 'JMA', 'T3'
You can select different settings for EACH MA ie. Their type, length, line size, fill or not.
You can quickly ‘Override’ all MA's types by selecting an Override Type. That way you can quickly keep your settings and compare them with another type.
In the same way, you can turn ON/OFF all 10xMA at the same time with one button.
You can plot a moving average of all the 10x moving averages and plot just that one.
'Tool tips' explain much of the settings but if you have any questions, feel free to ask. Thank you for the feedback and check all my ‘Dingue’ indicators.
Chimpanzee V2.5 part A by joylay83Hi everyone, I am an amateur pinecoder. I would like to share my script which is coded with the intention of generating signals to send to 3commas webhook. It is still in development and revision.
This collection of indicators use:
Chart: 15m.
Inverse Fisher Transformation of the RSI to detect dips in the 15m timeframe.
Bollinger band (4H) to filter out false signals.
Triple EMA 21: to mimic price action for easier coding alerts. Currently not involved in generating signals. will be incorporated in the future.
StochRSI: As a visual filter. Currently not involved in generating signals. will be incorporated in the future.
Background will be green if stochRSI is low and red if stockRSI is high.
Candlesticks will be marked with a flag is TEMA breached BB.
One would need to play around with timeframes, BB settings and IFTRSI threshold for different signals.
There are 2 Signal Modes (with regards to IFTRSI):
Threshold: When price action falls below BB and IFTRSI hits buy threshold, a buy/sell signal is generated. Eg if IFTRSI buy threshold is set to -0.9, the buy signal will remain continuously positive as long as IFTRSI is < 0.9.
Cross: When price action falls below BB and IFTRSI hits threshold, nothing happens. It will wait until the IFTRSI cross back over the threshold before firing a signal.
There is another identical set of indicators running on a higher time frame (IFTRSI: 4H, BB: D or 3D, TEMA 21 4H) but on the same chart. This tend to generate less signals but are more reliable. A usage example would be to send a larger buy order if the signal comes from this higher time frame, or execute a sell order after multiple buys from the lower time frame.
It comes in 2 parts:
Part A: Contains overlay display. This displays BB, Triple EMA, buy/sell and StochRSI in labels. the labels are self explanatory.
Part B (please search for it): which is actually the same code but contain non-overlay display. You may also put part B overlay=true but scale to LEFT. The advantage of using overlay=true is that you can move the signal right over the candlesticks (mainly for troubleshooting/debugging). This part contains Inverse Fisher RSI, %B, Signal Line. %B is supposedly idential to Bollinger Bands in Part A.
By default, when there is a buy/sell signal:
lower time frame 15m: Signal Line in Part B will turn blue with a value 1 or -1 which corresponds to a buy or sell label in Part A
higher time frame 4H: Signal Line in Part B will turn red with a value 2 or -2 which corresponds to a HTF buy or sell label in Part A
Part A or B may be used to send signal to the webhook. You have to make sure that the settings of Part A and B are identical.
You may choose to un-display some items to reduce clutter.
Current problems:
1. Still too many buy signals
Although many times it will generate excellent buy signal at many swing lows, but there are many buy signals prior to a major swing low. This can be observed in the picture above. It also generate a couple of buy signals prior to the swing lows. I am currently experimenting with 20m and hourly timeframe to address this issue. More filters are needed eg an oscillator or detecting candlestick patterns.
2. Premature sell signals.
The sell signal is often generated at the beginning of a major bull run. My idea to solve this problem is to move to a higher timeframe and sell only when TEMA crossunder the upper bollinger band.
3. Lack of a backtester that can test multiple concurrent deals.
Buy -> Buy (average down) -> Buy (average down) -> Buy (average down) -> Sell
4. Lack of the ability to calculate average purchase price
Probably have to code it as a strategy
5. Display lag
As the browser is running 2 copies of the idential script, it tends to lag when you drag your chart around. So far there are no timeouts or delay in firing alerts to 3commas.
I do welcome any suggestion for improvement and constructive criticism. tqvm.
Credits : Thank you for doing an awesome job. I learnt a lot from your codes and tutorials.
Credits not listed in any order. If your code is used here and did not receive due credit, kindly drop me a note. tq.
Blessing 3 by JTA Today
@ZenAndTheArtOfTrading (extremely-easy-to-understand tutorials eg fixing repainting)
@LazyBear (various codes)
@Galactus-B Argo I
@TheTradingParrot (Inverse Fisher RSI and Gavin's backtester)
@zendog123 (backtester and various codes)
@ydeniz2000 (Bollinger Bands)
TradingView built-in scripts
Signal Table - AutoFib - SMA - EMA - RSI - ATR - VolWith this indicator you can add a table on top of your chart.
What's in this table?
On which graph you open this table, the indicator data at the selected time of that graph are written. In the image below, you can see the table in the upper right.
You can also see two EMAs above the chart in this indicator. You can adjust their length.
You can add automatic fibonacci retracement levels to the top of the chart. In this way, you can see the Fibonacci levels on the chart and determine the support resistance. If the price is above the Fibonacci level, it will appear green on the chart, and red if below. You will understand as you use it.
It turns red if the RSI is below 30 and green if it is above 70.
Likewise, if the price is above the moving averages you have set, it appears as green, and if it is below it, it appears as red.
You can hide and activate the EMA and Fibonacci levels above the chart.
For example, you can get the ETH chart while the BTC chart is open in front of you. I think you will understand everything clearly from the settings tab below. Please support me. I hope you will be satisfied using it.
Time Locked Moving AverageSuccinct Description
Generates moving average that stays locked to users desired time preference.
Verbose Description
The default moving average indicator does not stay locked to the chart timeframe. Meaning, if you want to see a 1 day SMA on a 15 minute chart, you have to do math and adjust the moving average length to 96.
Needing to do this constantly (especially while flipping through multiple time frames) was really annoying, so I codded up this script to do it for me... and now it can for you too!
Error Handling
If you receive a 'study error' that says, "function sma references too many candles in history".
Go to the Time Locked Moving Average settings and increase the timeframe interval until error goes away.
Furthermore, UNCHECK gaps, to show real-time approximated moving average values.
Enjoy :)
Intraday MAs for Regular/Extended SessionThis indicator will allow you to show multiple EMA/SMAs for different timeframes on your chart. In addition, it can show you indicators calculated from regular and extended sessions, independently of the session type you have selected for your chart.
EMA MTF PlusI like trading the 1 minute and 3 minutes time-frames. I'm what is commonly called a "scalper". Long term investments yes, I have some, but for trading, I don't have neither the time,
nor the patience to wait hours or days for my trade to be complete.
This doesn't mean I discount the higher time-frames, no, I actually rely heavily on them. I found that EMAs do a decent job as support/resistance, sometimes to a tick level of precision. And this is important for a 1 minute trader.
As such, I made this script that tracks the higher time-frames EMAs and displays the last value as a line.
I do not need the whole EMA, I'm not interested in crossovers or crossunders, these are anyway late signals for me.
What's with the triangles? These are local tops/bottoms , candles that have a have decent size of the wick. These tops and bottoms are by no means "final", they are merely a rejection at certain levels of price. Due to markets complexities (and human erratic behaviors hehe) these levels could be breached at the very next candle. For a more "final" version (nothing is really final but..) I added Schaff Trend Cycle as filter, so a triangle will pop only when a trend is mature enough ( STC with a value near 0 or near 100).
Colored bars. When the body of the candle is big, it shows strength. Strong bars tend to have follow through, especially when breaking key levels. The script looks at the body of the candle and compares it with ATR (Average True Range), if it's at least 0.8 of ATR it changes the bar color to yellow (bull candles) or fuchsia(bear candles).
Range identifier. This code is copied from Lazy Bear (if there are any issues please let me know), it's very useful in conjunction with colored bars.
I look for breakout candles that go outside of the range as a signal for a trade.
There are many ways in which this script can be useful, like trading mean reversions or momentum trades (breakouts) or simply trend following trades.
I hope you guys find it useful, you can play with default values and change them as you like, these are what I found to be working best for me and my trading universe (mostly crypto).
Special thanks for the original work of:
LazyBear
everget
Jim8080
Swing Trades Validator - The One TraderThis swing trading strategy validator is built on the original strategy taught in my bootcamp for swing traders.
The strategy is simple and follows a trend trading pattern on prices reacting to Exponential Moving Averages over a multiple time-frame analysis.
The details of the strategy are as follows:
- Holding Period : Upto a couple of months
- Time-frames to be analysed : Month - Week - Day
- Trade Execution : Daily Time-frame
Analysis Details:
Step 1 : On the Monthly time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the month.
Step 2 : The price needs to be above the 8ema on the Monthly time-frame.
Step 3 : The 8ema must be above the 20ema on the Monthly time-frame.
The above steps indicate a bullish strength in the instrument on the Monthly time-frame.
Step 4 : On the Weekly time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the week.
Step 5 : The price needs to be above the 8ema on the Weekly time-frame.
Step 6 : The 8ema must be above the 20ema on the Weekly time-frame.
The above steps indicate a bullish strength in the instrument on the Weekly time-frame.
Step 7 : On the Daily time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the day.
Step 8 : The price needs to be above the 8ema on the Daily time-frame.
Step 9 : The 8ema must be above the 20ema on the Daily time-frame.
The above steps indicate a bullish strength in the instrument on the Daily time-frame.
Step 10 : While the 8ema is above the 20ema on the Daily time-frame, the price must be allowed to rise before a pullback is seen towards the moving averages, indicating a bearish move trying to change the trend.
Step 11 : These pullback candles need to form a pattern called the Ring Low with the second pullback candle having a lower high and lower low and the low of the last pullback candle being lesser than or equal to the fat ema on the Daily time-frame.
Step 12 : If the stock is still bullish and the trend is displaying a strength in the underlying bullish direction, then there will be a resumption candle that will have a closing price higher than the previous day's high price.
This trend continuation signal is a confirmation that the instrument will continue in the underlying trend direction and we will be able to enter if this condition is satisfied.
The profit and loss percentages are set at a default 10% as this can be a minimum risk : reward for swing trades on average, but the inputs have been made available to the users in order to adjust the risk : reward to find the most optimum breathing room for each individual stock or instrument. This will give the user a highly custom overview of the strategy on individual instruments based on their volatility and price movements.
The strategy tester will auto back-test this strategy historically and find all the trades that were taken based on this strategy and populate a performance summary.
The most important data in V1.0 of this script are as follows:
1. No. of Trades Taken : We want to see many trades being taken on this strategy in that particular instrument. This shows us a healthy report on the number of winning vs. losing trades.
2. Percentage Profitable : We want to see that this strategy has worked out in the past and is giving us a high probability of return. This in no way an indication that the strategy will definitely work out in the future as well, but gives us an idea of whether or not we should enter this trade.
3. No. of Winning Trades vs. Losing Trades : We would like to see a significantly higher number of winning trades.
4. Avg. # of bars in a trade : This gives us an idea of how long on average we might have to wait to see the results of this strategy either in favor of our reward or against our desired direction. Some trades can be completed in around 15-20 bars on average and some trades have shown to take upto 45 days to reach desired reward. This is in line with our planned holding period, but gives the trader a sense of time and increased level of patience.
The future updates will have more utility of the various elements of the strategy tester and the entire exit strategy will be integrated into the script.
This script is not to be used as a standalone method and must be studied well in order to execute trades. I have not hidden visibility on other time-frames, but since order execution is done on the Daily time-frame, the script must run on the Daily time-frame only.
There are many other factors to be taken into consideration before entering a trade and proper risk management and position sizing rules must be followed.
Our bootcamp participants will use this strategy tester in conjunction with the invite-only Trading Toolkit assigned to them.
The development of this script will be ongoing and all comments and feedback are welcome.
Swing EMAWhat is Swing EMA?
Swing EMA is an exponential moving average crossover-based indicator used for low-risk directional trading.
it's used for different types of Ema 20,50,100 and 200, 3 of them are plotted on chat 20,100,200.
100 and 200 Ema is used for showing support and resistance and it contains highlights area between them and its change color according to market crossover condition.
20 moving average is used for knowing Market Behaviour and changing its color according to crossover conditions of 50 and 20 Ema.
How does it work?
It contains 4 different types of moving averages 20,50,100, 200 out of 3 are plotted on the chart.
20 Ema is used for knowing current market behavior. Its changes its color based on the crossover of 50 Ema and 20 Ema, if 20 Ema is higher than 50 Ema then it changes its color to green, and its opposites are changed their color to red when 20 Ema is lower than 50 Ema.
100 and 200 Ema used as a support and resistance and is also contain highlighted areas between them its change their color based on the crossover if 100 Ema is higher than 200 Ema a then both of them are going to change color to Green and as an opposite, if 200 Ema is higher then 100 Ema is going to change its color to red.
So in simple word 100 and 200 Ema is used as support and resistance zone and 20 Ema is used to know current market behavior.
How to use it?
It is very easy to understand by looking at the example I gave where are the two different types of phrases. phrase bull phrase and bear phrase so 100 and 200 Ema is used as a support and resistance and to tell you which phrase is currently on the market on example there is a bull phrase on the left side and bear phrase on the right side by using your technical analysis you can find out a really good spot to buy your stocks on a bull phrase and too short on the bear phrase. 20 Ema is used as a knowing the current market behavior it doesn't make any difference on buying or selling as much as 100 Ema and 200 Ema.
Tips
Don't trade against the market.
Try trade on trending stocks rather than sideways stock.
The higher the area between 100 Ema and 200 Ema is the stronger the phrase.
Do Backtesting before real trading.
Enjoy Trading.
Higher Timeframe EMAs - 21/50/100/200This script lets you draw the 21/50/100/200 EMAs of the daily (or hourly) timeframe on lower time frames.
This was modified from :
@ZenAndTheArtOfTrading
RSI DINGUE - 3³ DivergenceThis is the updated version for PineScript V5
3x RSI indicator into 1. You can turn on or off all of them.
Each RSI has 2 individual Moving Averages that can also be changed to be "Full RSI" in the settings.
This makes 3x3 = 9 indicators on screen at the same time. (you can turn them on or off)
It has Bullish and Bearish divergence and hidden divergence as well.
Several visual options to show crosses between RSIs and or MAs fill in colors, background colors, midline. Overbought and Oversold levels with signals when entry and exit.
---------------------
In closing, no indicator can give perfect signals, you need to use them in conjunction with other information to make better decisions.
I hope you like my indicators and that they help your trading.
If you have any questions please ask.
Thank you.
EMA Cross + Divergence strategy (Div. signals by The Divergent)A sample strategy demonstrating the usage of The Divergent divergence indicator and The Divergent Library .
The Divergent is an advanced divergence indicator which you can easily incorporate into your own strategies.
In order to use this strategy (and to use the signals in your own strategy), you need to have the Pro version of The Divergent applied to your chart.
For more information, please see the comments inlined in the code.