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!
枢轴点
On-chart Wavetrend Divergence with PivotsThis is an OnChart WaveTrend Divergence Indicator with Pivots and Alerts
LazyBears WaveTrend Indicator or also known as "Market Cipher" is an Indicator that is based on Moving Averages, therefore its an "lagging indicator". Lagging indicators are best used in combination with leading indicators. In this script the "leading indicator" component are Daily, Weekly or Monthly Pivots. These Pivots can be used as dynamic Support and Resistance, Stoploss, Take Profit etc.
This indicator combination is best used in larger timeframes. For lower timeframes you might need to change settings to your liking.
What are those circles?
-These are the WaveTrend Divergences. Red for Regular-Bearish. Orange for Hidden-Bearish. Green for Regular-Bullish. Aqua for Hidden-Bullish.
Please keep in mind that this indicator is a tool and not a strategy, do not blindly trade signals, do your own research first! Use this indicator in conjunction with other indicators to get multiple confirmations.
Pivot Target (5m Futures)I am new to both Futures Trading and Pivots. Looking for shorter-term profitable opportunities, I have investigated the use of pivots from a higher timeframe. All the work of this script is performed using two lines. It calculates the pivot from the previous 2-hour bar and draws this pivot line on the 5-minute timeframe. Many many times, the price will reach back to this pivot point - sometimes fairly quickly within the same horizontal pivot line and sometimes farther out (4-hours to 6-hours, or within the next few days). Price tends to reach the level around ninety percent of the time, making for plenty of short-term trading opportunities.
I get the best results when I see the price rise or fall from the pivot, along with a second indicator indicating a possible reversal (my favorite is Divergence for Many Indicators v4 by LonesomeTheBlue . Who knew divergence (both regular and hidden) was so common and useful for finding probable reversals? If I find the price above or below the pivot line with a second signal, I'll place a buy or sell within that same 2-hour window the price tends to return back to the higher timeframe pivot for a nice profit very quickly. Other times it does take a little longer to return with only a small percentage of time not returning within a reasonable amount of time, or very unusually, not at all. The image above shows a number of profitable trading opportunities using a combination of the Pivot Target and LonesomeTheBlue's Divergence for Many Indicators v4. You can further limit risk by only taking trades that are in the same direction of the overall trend, possibly confirmed on a higher timeframe.
This script will only be visible on the 5-minute timeframe the way it is written right now. I wouldn't suggest shorter or longer timeframes unless some editing is done by you. It doesn't seem to work as well with stocks, but is best on Futures due to the wave-like natures of the futures market. Trade safe, trade with the trend, use stops and limits appropriately and stay safe.
RSI Centered PivotsJust a simple RSI central pivot strategy I made for a friend.
Backtested on BYBIT:BTCUSD, 155m.
DISCLAIMER : Please do your own research into anything you use before using it to trade.
Posty PivotsIndicator plots anticipated support/resistance areas based on prior day price action and includes breakout/breakdown targets.
This work is an original interpretation of Camarilla Pivots as well as the techniques taught by Pivot Boss.
As with everything context along with price action is crucial when trading potential reversal zones.
This indicator is used for intraday trading.
Pivot Reversal Strategy + alerts via TradingConnector to indicesSoftware 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 and 22.
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.
Pivot CrossoverThis indicator work on pivot point crossover. In this indicator use three pivot point
White color line is Pivot point for current bar.
Green/Red color line is Pivot point for last bar.
Yellow color line is Pivot point for 2nd last bar.
For long
if last pivot crossover above 2nd last pivot then go long
if current pivot crossover below last pivot then exit long
For short
if last pivot crossover below 2nd last pivot then go short
if last pivot crossover above last pivot then exit short
[FN] Strategy - Store Level on ConditionThis is a function that you can use in strategies. Not a strategy in and of itself.
Example thumbnail is showing the function applied to a strategy.
Oftentimes, I am asked a question regarding how to hold a variable at a specific, constant level over a conditional period of time. This question is always asked in a very long convoluted way like "I want the strategy to know what the high of the last pivot was while I'm in a long." or some other variation of wanting a script to remember something from prior bars.
This function is designed to store a price or some numeric level on the bar that your conditional (bool) statements determine that it should be stored. In this construct, you would set conditional statement(s) to flip the 'hold condition' to be true on the next bar, then hold that value until either the "hold condition" is no longer true or the initial conditions trigger again, causing an update to the level that you want to capture.
You still have to come up with the logic for the start condition and hold condition on your own, but I've provided an example that should give you an idea of how to accomplish this and customize/deploy the function for your purposes.
The function will return 'na' when neither the start condition nor hold condition are true. There's multiple ways to implement this and variations on how the level is chosen. I've written extensive notes in the script to guide you through the logic behind the function. My hope is that it will be useful to those trying to build strategies or anyone attempting to get their script to remember a level under given conditions.
In the thumbnail example, the take profit level is defined at the beginning of the trade and held until the take profit order executes. The order execution is a separate matter. However, storing the take-profit level at a static value is key to telling the strategy.exit() function what price to execute a limit exit order at.
Example: strategy.exit("Exit Long", from_entry = "long", qty_percent = 100, limit = stored_value)
Let me know how it works out for you and if I can be of any assistance.
Note: Strategy results are mainly derived from the fact that the strategy is long-only, the NQ only goes up, and there is no stop loss in place. So don't ask for the specific strategy, because unless you're trading a single contract with a $500,000 account, you'll probably get liquidated using this strategy as it is presented.
Gann Square of 9Gann's Square's are some of the best known tools created by Gann. His most well known square was his Square of 9.
The reason for this was because of the symmetry 9 had with itself. Gann was able to balance both price and time with this symmetry.
- 9 is the last single-digit and largest number
- You can add anything to 9 and it will give you a natural number
- (9 + 3 = 12); 1 + 2 = 3... (9 + 9 = 18); 1 + 8 = 9... etc.
- Multiplying any number by 9 will have the natural number be 9
- (9 * 6 = 54); 5 + 4 = 9... (9 * 3 = 27); 2 + 7 = 9... etc.
For these reason, Gann claimed that 9 has everything within itself.
Here I have created an on-chart square of 9 including the cardinal and ordinal cross points colored. In the settings you are able to customize the starting value of the table as well as the period movement. In most cases, 81 is not high enough to be useful in charting cases, so I'd recommend printing out your own Gann Square of 9 that goes as high as you need it to go.
THIS IS NOT TRADING ADVICE ; please use your own technical analysis before making any decisions based off of public indicators. Learn more about Gann's Squares before attempting to use them as this script was not meant to give you answers, only the table.
CPR by WsrWe recommend some preconditions for Intraday Trading Strategy with CPR (Central Pivot Range)
Rules For BUY Setup with CPR
1) Today's Pivot Level Should be higher than Previous Day's Pivot Level
2) The previous day's close should be near day's high.
Rules For SELL Setup with CPR
1) Today's Pivot Level Should be lower than Previous Day's Pivot Level
2) The previous day's close should be near day low.
CPR or central pivot range is the best tool available for the trader to see the price base indicator. You can use this tool i.e CPR (central pivot range) to check the price indicator in the stock market. You know the price of shares sometimes goes up or sometimes goes down in the stock market. So it will be best to stay updated and know it before the time the share market/stock market fall or rises.
MTF Order Block FinderAn Order Block is a special type of pivot point that satisfies the following requirement:
A Bull/Bear candle followed by X consecutive candles in the opposite direction.
Order Blocks are interesting areas that are frequently revisited and can be treated as Support/Resistance levels.
Often, you can see explosive price rejection of these areas via long wicks, high volume, and rapid price change.
Features
Choose from two themes:
- LIGHT: a classic Red and Green representing Bearish and Bullish OBs, respectively
- DARK: a clean Blue and White scheme
Choose from two drawing styles:
- LINE: three lines representing the High, Low, and Mid price levels of the OB candle
- BOX: a bounded area similar to the "rectangle" tool
Chose a custom timeframe:
- From 1 Minute (useful for Seconds interval) up to 1 Month
Note, this setting is experimental and choosing a timeframe that is extraordinarily large may not function properly.
Filter order blocks with two settings:
- Number of consecutive bars
- Minimum % change of the potential OB bar (default 0.25%)
Keep your charts clean and show only relevant OBs
- Maximum number of Bullish zones to show
- Maximum number of Bearish zones to show
FAQ
Q: How do I trade with this indicator?
A:Personally, I use a fast entry indicator to confirm Long/Short position when price is rejected. I set my SL and TP based on the current Zone and the next one, if available.
Q: Does this repaint?
A:Yes and this is okay! The "Bear" and "Bull" signals are not meant for taking positions, only showing which candle reveals the Order Block. The Zone is much more useful to us and can result in several successful trades in the near future when treated as a support/resistance area.
Q What's the winrate?
A:Hard to say - this isn't a standalone strategy and I haven't been able to properly backtest it quite yet.
[CP]Pivot Boss Candlestick Scanner - No Repainting This indicator is based on the high probability candlestick patterns described in the ’Secrets of a Pivot Boss’ book.
The indicator does not suffer from repainting.
I have kept this indicator open source, so that you can take this indicator and design a complete trading system around it.
Although the patterns have some statistical edge in the markets, blindly using them as Buy/Sell Indicators will certainly result in a heavy loss.
I like some of these setups more than others, and I have listed them in the order of my likeness.
The first one I like the most, the last one, I like the least.
The patterns are universal and work well in both intraday, daily and even larger timeframes.
Signals in the example charts are manually marked by,
Hammer - profitable short signal
Rocket - profitable long signal
X - unprofitable long or short signal
GENERAL USER INPUTS:
These settings exist as the indicator uses ‘Labels’ to mark the patterns and Pine Script limits a maximum of 500 labels on a chart.
If you want to go back in the past and check how the indicator was doing, set the Start and End dates both and check the ’Use the date range above to mark the Candlestick Setups?’ option.
EXTREME REVERSAL SETUP:
This is by far my favorite setup in the lot. Classic Mean Reversion setup.
The logic, as explained in the book, goes like this,
1. The first bar of the pattern is about two times larger than the average size of the candles in the lookback period.
2. The body of the first bar of the pattern should encompass more than 50 percent of the bar’s total range, but usually not more than 85 percent.
3. The second bar of the pattern opposes the first.
The setup works extremely well in high beta stocks like Vedanta VEDL.
Feel free to play with the settings in order to better align this pattern with your favorite stock.
Check out the examples below,
No indicator is perfect, failed patterns are marked with an X.
OUTSIDE REVERSAL SETUP:
My second favorite setup, it is quite good at catching intraday trends.
Here’s the logic,
1. The engulfing bar of a bullish outside reversal setup has a low that is below the prior bar’s low and a close that is above the prior bar’s high. Reverse the conditions for bearish outside reversal.
2. The engulfing bar is usually 5 to 25 percent larger than the size of the average bar in the lookback period.
Settings for this pattern simply reflect these conditions. Feel free to modify them as you wish.
The pattern is pretty powerful and will sometimes help you catch literally all the highs and lows of the market, as shown in the examples of Vedanta VEDL and RELIANCE stocks below.
As usual, this pattern is not PERFECT either.
DOJI REVERSAL SETUP:
Doji candles signify market indecision and this pattern tries to profit off these market conditions.
Logic:
1. The open and close price of the doji should fall within 10 percent of each other, as measured by the total range of the candlestick.
2. For a bullish doji, the high of the doji candlestick should be below the ten-period simple moving average. Vice-versa for bearish.
3. For a bullish doji setup, one of the two bars following the doji must close above the high of the doji. Vice-versa for bearish.
Feel free to modify the settings and optimize according to the stock you are trading.
Don't optimize too much :)
This pattern works brilliantly well on larger intraday timeframes, like 15m/30m/60m.
This pattern also has a higher propensity to give false indications than the two described above.
Doji reversal typically helps to catch larger trend reversals. Check out the examples below from RELIANCE and NIFTY charts,
Note that the RELIANCE chart below is the same as shown for the Outside Reversal Setup above, notice the confluence of Outside
Reversal and Doji Reversal on the 31st August.
Confluence of patterns usually increases the probability of success.
RELIANCE 15m Chart - Pattern can catch nice trends on higher timeframes
NIFTY 15m Chart
WICK REVERSAL SETUP:
This pattern tries to capture candlesticks with large wick sizes, as they often indicate trend reversal when coupled with significant support and resistance levels.
Logic:
1. The body is used to determine the size of the reversal wick. A wick that is between 2.5 to 3.5 times larger than the size of the body is ideal.
2. For a bullish reversal wick to exist, the close of the bar should fall within the top 35 percent of the overall range of the candle.
3. For a bearish reversal wick to exist, the close of the bar should fall within the bottom 35 percent of the overall range of the candle.
This pattern must always be coupled with important support resistance levels, else there will be a lot of false signals.
The chart below is the same NIFTY chart as above with the Wick Reversal candles marked as well.
You can see that there are a lot of false signals, but the price also indicates ’pausing’ at important levels by printing a wick reversal setup.
You can use this information to your advantage when riding a trend.
FINAL WORDS:
Settings for various patterns simply reflect the logic described.
You will probably need to tweak and optimize the pattern settings for the stock that you are trading.
Higher Beta/Higher Volatility stocks are a great choice for these patterns.
Using these patterns at critical support and resistance levels will result in dramatically high accuracy.
Be creative and try to develop a proper system around this indicator, with rules for position sizing, stop loss etc.
You do not have to trade all the patterns. Even trading just one pattern with a proper system is good enough.
DO NOT USE THIS INDICATOR AS A BUY/SELL SYSTEM, YOU WILL LOSE MONEY.
Feel free to drop any feedback in the comments section below, or if you have any unique candlestick patterns that you would like me to code.
Zigzag SARThis is another ZigZag script. But the difference between this and other ZigZag indicators on TV is that here we find highs and lows based on Parabolic SAR.
It repaints?
YES.
On last line of ZigZag you get repainting, because the highs and lows get confirmation only if direction (SAR dots) changes.
This shouldn't be used to forecast highs and lows directly anyway, it's just a visual guide for past highs and lows.
I'm using it to spot harmonic patterns and Wolfe waves more easily. The plan is to draw these automatically in the future, but my skills at Pinescript are limited at the moment.
PS. Ideas for my scripts are coming from @Jegejig1 on Stocktwits, if you want to know who to blame lol
Levels Off Previous Day CloseThis script calculate the 90-120-180-240-360 Percent gains based on the previous day close.
Three Week Tight Pattern IndicatorThree Week Tight Pattern is a consolidation indicator which give extra buy point on strong fundamental stocks. You can read about it from IBD here: www.investors.com
Order Block FinderAfter finding a huge amount of use from TV user's wugamlo script Order Block Finder (Experimental) , I decided to make some much needed upgrades! Added support for plotting the last X number of Order Blocks and am currently working on a multi-timeframe version.
If you'd like to contribute to the MTF analysis portion, that would benefit tons of other scripts and open the possibility to more "MTF Panel" style indicators.
Please visit the original script page (link at top) to review how the indicator is used in trading.
Pivot order block boxes [LM]Hello traders,
let me intoduce you pivot order block boxes. The idea is find the pivot point that within the right side count of candles achieved some percentage change and in that way filter out important pivots. Once the pivot point is found and matches the volatility condition then from the left side of pivot first candle that is up candle for pivot high and down candle for pivot low, could be also the pivot candle itself is selected and rendered high and low of that candle. The premise behind is that those are the levels profesional traders are buying.
It has two settings that you can change at your will, it also enables hide/show particular pivot setting
Hope you will enjoy as I enjoyed to write it.
Lukas
Intermediate Swing LabelsDraws labels above Intermediate Swing Highs, and below Intermediate Swing Lows. Intermediate Swing Highs are highs with swing highs on either side. Intermediate Swing Lows are lows with swing lows on either side.
Pivot Points And Breakout Price Action With LuckyNickVaBar Color Candle Aligned with pivot points swing high and swing lows For Those Who Are Familiar with Trading The Breakouts Of Highs & Lows Of Structure. Pivots are said to be key areas in the market where price shows heavy reaction to where reversals make occur. At these points there are swing Highs & swing lows that traders may be able to find opportunity in the market. This Script is a combination of pivot points and Barcolor signals for the breakout.
Multi Range Pivots
Multi Range Pivots works by recognizing the high and low of the timeframe selected and plotting range high to MEAN averages and range low to MEAN averages.
This is essentially the VWAP pivots updated to include not only VWAP as a MEAN, but also SMA, EMA, VWMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3, H/L basis and Donchian basis.
Also, with high and low no longer repainting, I was able to add true reliable signals.
Enjoy
Monthly Returns in PineScript StrategiesI'm not 100% satisfied with the strategy performance output I receive from TradingView. Quite often I want to see something that is not available by default. I usually export raw trades/metrics from TradingView and then do additional analysis manually.
But with tables, you can build additional metrics and tools for your strategies quite easily.
This script will just show a table with monthly/yearly performance of your script. Quite a lot of traders/investors used to look at returns like that. Also, it might help you to identify periods of time when your strategy performed good/bad than expected and try to analyze that better.
The script is very simple and I believe you can easily apply it to your own strategies.
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 well as in historical backtesting.
This post and the script don’t provide any financial advice.
Average Zigzag Range (AZR)Here is an attempt calculate Average Zigzag Range (AZR). This can be used similar to ATR. Using AZR instead of ATR for trailing stop calculation may yield better outcome in trend trading.
Logic is simple.
Calculate zigzag based on ZigzagLength
Calculate distance between each zigzag pivots
Calculate simple moving average of last MALength pivots
Use DoubleMA option to further smooth AZR using a Secondary Moving Average
Breakout in 20 daysbreakout condition
1. current close price must be higher than all close prices in 20 days
2. close prices change in 20 days must be less than 20%
3. current volume must be greater than previous volume by 10%
ブレイクアウト条件
1. 最新の終値が直近20日のすべての終値より高い
2. 直近X日の終値の変動率が20%以下
3. 最新の出来高が前日の出来高より10%大きい