Support Resistance InteractiveHello All,
Using this "Support Resistance Interactive" script you can set the Support/Resistance levels interactively by clicking on the chart. Using the SR levels you set, the indicator creates Support Resistance zones. The width of the zones are calculated by using Threshold option and Threshold is the percent of the distance between Highest/Lowest levels in last 300 bars. if you set Threshold = 1 then it means 1% of the distance between Highest/Lowest levels. You can change SR levels by moving the level up/down by using your mouse anytime you want.
Now lets see it step by step;
After you added the indicator it will ask 5 Support/Resistance Levels and when you click any point then it's kept as S/R level and it asks another SR levels. if you want to use only 3 SR levels then last 2 SR levels are not important and you can click anywhere on the chart;
After you set all SR levels, it will ask "Number of Support/Resistance" . if you want to activate first 3 SR lines then set it 3. by default it's 5. when you set it click "Apply" and see the SR zones. that's it.
You can enable/disable alerts and set frequency, then create alerts. as it's interactive tool, the SR levels you set are specific for the current/active symbol. if you open another symbol then you better delete the indicator and add it again
Three Alerts exist in the script: Support Broken, Resistance Broken and Price in SR zone . you can enable/disable the alerts as you wish and you can set frequency for each one as "Once Per Bar" or "Once Per Bar Close"
by default Green/Red/Gray colors are used but You can change the colors using the options. according to the Price moves, SR zone colors are changed automatically.
when we have "Reset" feature to run the script interactively (like we added it for first time) I can update the script, then you will not need to delete/re-add each time you changed the symbol :)
In this example "Threshold" is 2 and "Number of Support/Resistance" is 4.
in this example "Threshold" is 0 and "Number of Support/Resistance" is 5.
Last example; Labels are shown for each zone, you can set location of the labels. SR order and Upper/lower band of each zone are shown in each label.
Enjoy!
Trendtrading
Higher Time Frame Chart OverlayHello All,
This script gets OHLC values from any security and Higher/Same time frame you set, then creates the chart including last 10 candles. it shows Symbol name, Time Frame, Highest/Lowest level of last 10 candles and Close Price at the right side of the chart as well. Closing price text color changes by the real-time candle of the related symbol and time frame. The all this was made using the Tables in Pine and the chart location doesn't change even if you change the size of main chart window.
Almost everything can be change as you want. You can change/set:
- Colors of Body and Top/Bottom Wicks separately
- The Height of each Cell
- The Width of Body and Wicks
- The Background and Frame color
- Enable/disable Status Panel (if you disable Status Panel then only candle chart is shown)
- Location of Status Panel
- Text color and Text size
- The Background color of Status Panel
Some examples:
The info shown in Status Panel:
You can change The Height of each Cell and The Width of Body and Wicks
You can change colors:
You can change location of the chart:
If you add the script more than once then you can see the charts for different symbols and time frames: (This may slow down your chart)
If you right-click on the script and choose "Visual Order" => "Bring to front" then it will be better visually:
P.S. Using this script may slow down your chart, especially if you add it more than once
Enjoy!
Indicators OverlayHello All,
This script shows the indicators in separate windows on the main chart. Included indicators are RSI, CCI, OBV, Stochastic, Money Flow Index, Average True Range and Chande Momentum Oscillator. indicator windows are located at the top or bottom of the chart according to last moves of the Closing price. Different colors are used for each indicator. Horizontal levels are shown as dashed line and label as well.
Using the options;
You can enable/disable the indicators you want to see or not
You can change source and length for each indicator
You can set window length. using this length indicator windows are located on the chart
After you added this indicator to your chart I recommend: right click on any of the indicator windows => "Visual Order" => "Bring to front" as seen screenshot below:
in this example only 3 indicators enabled and period is set as 80:
indicator windows moves to the top or bottom of the chart according to the close price:
P.S. if you want to see any other indicator in the options then leave a comment under the indicator ;)
Enjoy!
Bixord: FantailVMAThis indicator is a combination of moving average and ATR indicators. The indicator stays pretty close to price and at the same time shows clear trend of asset/stock. It shows you when price is above the FantailVMA it indicates an uptrend and when price is below it indicates a downtrend otherwise.
Hope you find this indicator useful!
Happy trading..
3rd WaveHello All,
In Elliott Wave Theory, 3rd wave is not the shortest one in the waves 1/3/5 and it's usually longest one. so if we can catch it then we may get good opportunities to trade. This script finds 3rd wave experimentally. it can be also the 3rd waves in the waves 1, 3, 5, A and C. the 3rd wave should have greater volume than other waves, the script can check its volume and compare with the volumes of the waves 1 and 2 optionally.
Pine Team released Pine version 5! This script was developed in v5 and it uses Library feature of Pine v5 for the zigzag functions. This script is also an example for the Pine developers who learn Pine v5 and Libraries.
Options:
Zigzag Period: is the length that is used to calculate highest/lowest and the zigzag waves
Min/Max Retracements: is the retracement rates to check the wave 2 according to wave 1. for example; if min/max values are 0.500-0.618 then wave 2 must be minimum 0.500 of wave 1 and maximum 0.618 of wave 1.
Check Volume Support: is an option to compare the volumes of1. 2. and . waves. if you enable this option then the script checks their volume and 3rd wave volume must be greater then 1 and 2
there are 4 options for the targets. you can enable/disable and change their levels. targets are calculated using length of wave 1.
Options to show breakout zone, zigzag, wave 1 and 2.
and some options for the colors.
The Library that is used in this script:
P.S. This is an experimental work and can be improved. So do not hesitate to drop your comments under the script ;)
Enjoy!
CreateAndShowZigzagLibrary "CreateAndShowZigzag"
Functions in this library creates/updates zigzag array and shows the zigzag
getZigzag(zigzag, prd, max_array_size) calculates zigzag using period
Parameters:
zigzag : is the float array for the zigzag (should be defined like "var zigzag = array.new_float(0)"). each zigzag points contains 2 element: 1. price level of the zz point 2. bar_index of the zz point
prd : is the length to calculate zigzag waves by highest(prd)/lowest(prd)
max_array_size : is the maximum number of elements in zigzag, keep in mind each zigzag point contains 2 elements, so for example if it's 10 then zigzag has 10/2 => 5 zigzag points
Returns: dir that is the current direction of the zigzag
showZigzag(zigzag, oldzigzag, dir, upcol, dncol) this function shows zigzag
Parameters:
zigzag : is the float array for the zigzag (should be defined like "var zigzag = array.new_float(0)"). each zigzag points contains 2 element: 1. price level of the zz point 2. bar_index of the zz point
oldzigzag : is the float array for the zigzag, you get copy the zigzag array to oldzigzag by "oldzigzag = array.copy(zigzay)" before calling get_zigzag() function
dir : is the direction of the zigzag wave
upcol : is the color of the line if zigzag direction is up
dncol : is the color of the line if zigzag direction is down
Returns: null
Crypto Scannner for Traffic Lights StrategyI allways try to make trading easier. Developing Scripts for a quick backtest and improvement of a strategy, getting alerts for entry and exit a position. Loading data to a spreadsheet is also important and takes time.
In this case finding good parameters in different markets or assets to enter in a position, is a bit exhausting. It is something you have to do everyday, and sometimes in different moments of the day.
So I manage to develop a Screener, to take a quick look at specific hours, and tell if I have a buy or sell condition in an specific asset. Obviously this is not an alert to make a trade instantaneusly, but this help you filter a lot of information in matters of seconds. Then open those specific charts and make a better analisys.
A few weeks ago, I published a scrpipt called "Traffic Lights Strategy", that uses 4 emas to get a buy or a sell condition.
It is easy to understand and use, but if you don´t want to missed some opportunities, and don't want to be look at the screen in all the time looking for them, I have here a simple solution.
This script works plotting 2 labels. The first one plots all the assets in which the condition is true (fastema > medema > slowema > filterema or fastema < medema < slowema < filterema)
The second one plots the assets were the condition is true only if happened up to 5 candles back, so you can be in time to enter a trade.
You can take the script and customize it for a different strategy or assets. I coded like this because I backtested this strategy in this specific assets, and statistics suggest that it might be profitable.
I hope this works for you. In other time I'll try to code a script for the others strategies I published.
8 Day Extended Runs Inspired by Linda Bradford Raschke.
Strategy suited to the US T-note (ZN1!) with a t-test of 4.06.
The 5 day SMA is vital to Linda’s trend identification system. She’s done extensive testing and research using this indicator and has built models based on it. Linda used the 5 day SMA to determine that large outlier price moves happen in the direction of the trend in each market about 9-10 times per year. The powerful part about that number is that when the trend does persist, it can go on a long run, making this a trade with a high expected value.
Note: the current exit criteria is sell 10 days after entry, users should experiment with different stop placements.
ZigZag Chart with SupertrendHello All,
This script creates Zigzag Chart by using Zigzag waves, so it's timeless chart meaning that no time dependency on X-axis. Optionally it can calculate & show Zigzag Supertrend or Simple Moving Average. Also it can change bar colors of the main chart by trend direction of Zigzag Supertrend.
As seen below, each zigzag wave is a candle on Zigzag chart:
You have a few options and using these options you can find best settings for the securities/timeframes.
You can change Zigzag period, if you change Zigzag Period then all zigzag and the chart is recalculated/reconstructed.
You have option to show Zigzag Supertrend or Zigzag Moving Average, the options you have;
- You can change ATR Length and ATR multiplier for supertrend
- You can change Length for Simple Moving Average
You can change Zigzag candle & wick colors using options. Also you have option to change bar colors according to Zigzag Supertrend direction.
As it's timeless chart, below you can see how/when bar colors and Zigzag Supertrend change:
You can see Simple Moving Average of the Zigzag Candles:
You can play with ATR length and multiplier to find best supertrend:
You can play with the candle & wick colors:
Enjoy!
WEEKLY BTC TRADING SCRYPTWeekly BTC Trading Scrypt(WBTS)
This script is only suggested for cryptocurrencies and weekly buying strategy which is long term.Using it in another markets(e.g forex,stock,e.t.c) is not suggested. The thing makes it different than other strategies we try to understand bull and bear seasons and buying selected crypto currency as using formula if weekly closing value crossover eight weeks simple moving avarage buy,else if selected crypto currency's weekly closing value crossunder eight weeks simple avarage sell. Eight week moving avarage is also uses weekly closing prices but for being able to use this strategy ,trading pair must have more than eight candles in weekly chart otherwise the 8 weeks simple moving avarage value cannot be calculated and script does not work.
This script has a chart called WBTS and it has following features:
Strategy group consist of 3 inputs:
1)Source: Close by default. Our whole strategy uses close values. You can change it but not suggested.
2)Loss Ratio: Because of the cases like the circumstances that manipulates market or high volatility , sometimes graphic show wrong buying signals and this ratio saves user from big money looses(Note : This ratio will always work when selling condition occurs to make user take his profit or prevent him to loss more money because of a wrong positive comes from the indicator.)
3)Reward Ratio : When selling condition happens it will exit user with more profit(if price is already higher than buying point) otherwise it will dimunish loss a bit(if user is below of buying point) or prevents looses(if user is in buying point when selling condition happened.
MA group consist of 2 inputs:
COLOR:Specifies color of the moving avarage.It is equal to #FF3232by hex color code by default.
LINE WIDTH: Specifies linewidth of the moving avarage. It is 2 by default.
GRAPHIC group consist of 2 inputs:
COLOR: It specifies the color of the line which consist of weekly closing prices. It is equal to #6666FF hex color code by default.
LINE WIDTH: Specifies linewidth of the line which consist of weekly closing prices. It is 2 by default.
STRATEGY EXECUTION YEAR: It will show the orders,profits and looses done by script after the input year giving in it.It is 2020 by default.
The last feature is strategy equity,it is not in one of these groups. User should click on settings button on the WBTS indicator than chose Style section and there is a deactivated check box near in the plot section if user activate it, the equity line will show in indicator's graph.
Logic of This Strategy:The story of this strategy began when I studied BTC's price movement from 2020 to today with 8 weeks simple moving avarage (it takes weekly closes as source) and weekly clossing values. I understood that there was a perfect interest between bull and bear market and following conditions:
buy_condition=crossover(weekly_closing_values,8_week_simple_moving_avarage)
sell_condition=crossover(weekly_closing_values,8_week_simple_moving_avarage)
and I tried same thing on the same and bigger time frames("for example i studied how the strategy works from the beginning to today with bitcoin and what is our final equity") with bitcoin and other cryptocurrencies and this made me saw better the relation between giving conditions and general market psychology, however I also witnessed some wrong positives coming by script and used a risk reward ratio to save user and set risk reward ratio 1/3 after a research.
For both conditions(buy_condition and sell_condition),when they are realised,script will alert users and an order will be triggered.
Before finishing the description,from settings/properties/ user can set initial capital,base currency,order size and type,but it is 100000 for initial_amount and 1 contract for order size by default.
In backtesting I used the options like the following example :
Initial capital=1000
Base_curreny=USD
Order size=40 USD
Properties place must set different by every single user according to his or her capital and order size must not be higher than his total money because this script is not the best or a good script for derivatives. It is only written for long term-crypto spot trading and I strongly recommend to users that margin may cause bad results and please do not use it with any margin or any market different than crypto market.
Thank you very much for reading)
Traffic Lights Strategy4HS Crypto Market Strategy
This strategy uses 4 ema to get Long or Short Signals
Length are: 4, 9, 18, 100
We take long positions when the order of the emas is the following:
green > yellow > red (As the color of Traffic Lights) and they are above white ema (Used as a filter for long positions)
We take short positions when the order of the emas is the following:
green < yellow < red (As the color of inverse Traffic Lights) and they are below white ema (Used as a filter for short positions)
Enable Long and/or Short Positions in settings
Enable Profit and Stop in strategy settings with different percentage to backtest the strategy. Also if it is better to use a Traditional Stop Loss or a Trailing Stop Loss based on ATR
Change ema filter resolution in settings for better strategy performance
This Strategy was tested on Crypto Market with good results in assets as BTC, ETH, BNB, ADA, LTC, XLM, BCH, among others
Feel free to optimize this strategy, optimizing its parameters. Each asset has its own "personality".
On Balance VolumeEnhanced the original OBV (On Balance Volume) indicator:
- Draw max lines of OBV in the last 30 candles so that we can notice the trend, as well as divergences easier.
- If you use fiat as base currency (USDT in cryptocurrency for example), we can display the OBV in fiat, so that we can compare total trading volume across a list of symbols to find healthy symbols to trade easier.
Ichimoku Cloud Strategy IdeaThis strategy idea uses the famous Ichimoku Cloud (Forward-shifted SMA-9 and SMA-26) and Chiku (52-candle lagged close price) with its default parameters. This strategy is slow and issues few signals. However, this is one of the most performant long-term trend trading strategies. It usually works well on 1D and 4H timeframes and even better on trending instruments. This is the implementation used in QuantCT app.
You can set operation mode to be Long/Short or long-only.
You also can set a fixed stop-loss or ignore it so that the strategy act solely based on entry and exit signals.
Trade Idea
When both close price and chiku are above the cloud, market is considered rising (bullish) and the plotted cloud becomes green.
When both close price and chiku are below the cloud, market is considered falling (bearish) and the plotted cloud becomes red.
Otherwise, market is considered ranging and the plotted cloud becomes orange.
Entry/Exit rules
Enter LONG right after both close price and chiku went above the cloud (i.e. when the end of the plotted cloud becomes green).
Enter SHORT right after both close price and chiku went below the cloud (i.e. when the end of the plotted cloud becomes red).
EXIT market when close price enters the cloud.
CAUTION
It's just a bare trading idea - but a profitable one. You can enhance this idea and turn it into a full trading strategy with enhanced risk/money management and optimizing it, and you ABSOLUTELY should do this!
DON'T insist on using Long/Short mode on all instruments! This strategy performs much better in Long-Only mode on several instruments (Like BTC , ETH, etc.), and also performs better in Long/Short mode on other instruments (Like VET, BNT, etc.).
MA Visualizer™TradeChartist MA Visualizer is a Moving Average based indicator aimed to visualize price action in relation to the Moving Average in a visually engaging way.
===================================================================================================================
█ MA Visualizer Features
11 different Moving Averages to choose from the settings to visualize based on MA Visualizer Length (Default - 55 period SMA).
2 Smoothing options (default - 0, 0 uses MA length as Smoothing factor, 1 uses no Smoothing).
4 colour themes to choose from and option to adjust Visualizer Vibrance.
█ Example Charts
1. 1hr chart of OANDA:XAUUSD using 55 period WMA.
2. 15m chart of OANDA:EURUSD using 144 period Tillson T3 MA.
3. 4 hr chart of OANDA:US30USD using 55 period SMMA.
===================================================================================================================
Best Practice: Test with different settings first using Paper Trades before trading with real money
===================================================================================================================
Relative Strength 3D Indicator [CC]This is a custom indicator of mine loosely based on the work by James Garofallou (Stocks and Commodities Sep 2020 pg 14) and this is meant for medium to long term trend confirmations. The idea behind this indicator is to capture 3 different dimensions of trend strength. The first dimension captures the overall strength of the underlying stock vs the market (in this case the S&P 500). The second dimension captures the overall trend strength by assigning a scoring system so when all faster moving averages are stronger than slower moving averages then it gets the max points. The final dimension is the strength of the overall strength of everything so far. Buy when the indicator line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish!
Natural Directional Index [CC]The Natural Directional Index was created by Jim Sloman and this is another indicator that I'm publishing from the collection of Ocean indicators. I want to make sure his legacy is covered by as many eyes as possible. This is his version of the directional index indicator but he uses his weighting method to use the square root of time and you can see that the signals are very smooth. Big thanks of course to @altcoinz and @tmac87 for helping me get the full source code and files for all of his work. This indicator captures the current trend and I have used my strong buy and sell signals to let you know the strength of the current trend. Darker colors are for strong signals and lighter colors are for normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Natural Stochastic Indicator [CC]The Natural Stochastic Indicator was created by Jim Sloman and this is another indicator from his Ocean series which I will eventually publish all of them. Big thanks to @altcoinz and @tmac87 for giving me all of the source code in order to publish Jim's life work. This is another momentum indicator but unlike a traditional stochastic indicator, this one doesn't use overbought and oversold levels. Instead it becomes a sell signal when the indicator starts getting lower and vice versa. This takes the classic approach to a stochastic and combines it with the time factor from Jim's Ocean Theory to create this new indicator. I have included strong buy and sell signals as darker colors and normal buy and sell signals as lighter colors. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Ehlers AutoCorrelation Indicator [CC]The AutoCorrelation Indicator was created by John Ehlers (Cycle Analytics pgs 94-98) and this can be viewed as both a momentum indicator and a trend indicator. This was his basis for several other indicators that he created which I will be publishing soon but essentially as this indicator goes up then the stock is in an uptrend and also has upward momentum. You will notice that this indicator starts to go down even during an uptrend showing that the underlying trend is going to have an upcoming reversal. He also warns that the halfway mark is a possible reversal point so keep an eye out for that.
Generally speaking a good signal is to enter a long position when the indicator is under the midline and is starting to go up (or when the line is green) and to exit the position when the indicator goes over the midline. I have included strong buy and sell signals in addition to normal ones so darker colors mean strong signals and lighter colors mean normal signals.
Let me know if there are any other indicators you would like me to publish!
Volume Profile / Fixed RangeHello All,
This script calculates and shows Volume Profile for the fixed range . Recently we have box.new() feature in Pine Language and it's used in this script as an example. Thanks to Pine Team and Tradingview!..
Sell/Buy volumes are calculated approximately!.
Options:
"Number of Bars" : Number of the bars that volume profile will be calculated/shown
"Row Size" : Number of the Rows
"Value Area Volume % " : the percent for Value Area
and there are other options for coloring and POC line style
Enjoy!
Ultimate Moving Average [CC+RedK]The Ultimate Moving Average was created by myself and @RedKTrader and I can proudly say that this is the holy grail of moving averages. Not only does this moving average react to the current price trends like a normal moving average but we have also included the ability to react to volume, momentum, and volatility. The only thing this moving average can't do is wash your car.
The Ultimate Moving Average doesn't even use a set length so it is fully adaptable to any type of market whether it is choppy or trending. It tightens during volatile markets and loosens during choppy markets. I have included 3 of the main moving averages of a fixed length of 20 days to show you just how much better our moving average is.
The overall concept of this moving average was to fully adapt to any and all changes of the underlying stock. We used my Variable Power Weighted Moving Average as a base and changed the script to adapt to momentum instead. The idea behind this was when momentum reaches an extreme in either direction we tighten the moving average to be able to react accordingly. We then used the idea behind my Variable Length Moving Average to be able to react to volatility and make the length itself into a separate variable.
All of this work combined to create the most reactive moving average out there and I guarantee you will be using this in your daily trading! Let me know if there are any other scripts you would like to see me publish.
Momentum Trading By Mahfuz AzimA following indicator is Momentum Trading that uses fast QQE crosses with Moving Averages
Use for trend direction filtering. QQE or Qualitative Quantitative Estimation is based
Relative strength index (RSI), but uses a smoothing technique as an additional transformation. Three crosses can be selected (all selected by default)
Natural Moving Average [CC]The Natural Moving Average was created by Jim Sloman (Ocean Theory pgs 63-70) and this is the one of the best moving averages you will find! This is one of the most adaptive moving averages that I have ever seen that accounts for all types of volatility. I have included a default value of 40 for the length so you can see just how close this moving average sticks to the underlying price movements. Feel free to try out your own lengths to see what you like best. I have included strong buy and sell signals in addition to normal ones so darker colors mean strong signals and lighter colors mean normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Cup FinderHello All,
This script finds the Cups and you can use it while analysing the symbols. it creates circle and channel for the potential Cups and checks the number of bars included by the channel, if included bars is equal or greater than the value you set then it shows the cup.
The Options:
"Number for Bars to search" : Maximum length of a Cup
"Channel Width of the Cup" : Tate by the channel width of highest/lowest levels in last 300 bars, by default it's 5%
"Check for Breakout" : if there is Cup then it checks Close or High/Low is used a source for breaokuts, usuful while cheking historical bars
"Contained Bar Rate %" : after channel is created the script checks number of bars included by the channel of the Cup, you can set rate of included bars by this option
"S how Channels of Cups ": if you enable this option then you can see the channels around the Cups and set it as you wish
and there are some other options for labeling/removing old Cups and for coloring
Here you can see how channel looks like:
Cup with different colors:
P.S. This is an experimental work and sorry for no explanation in the script.
in the future if I have time I will try to write a script for Cup&Handle
This script is also an example to calculate and draw circles :)
Enjoy!