Point and Figure (PnF) ChartThis is live and non-repainting Point and Figure Charting tool. The tool has it’s own P&F engine and not using integrated function of Trading View.
Point and Figure method is over 150 years old. It consist of columns that represent filtered price movements. Time is not a factor on P&F chart but as you can see with this script P&F chart created on time chart.
P&F chart provide several advantages, some of them are filtering insignificant price movements and noise, focusing on important price movements and making support/resistance levels much easier to identify.
If you are new to Point & Figure Chart then you better get some information about it before using this tool. There are very good web sites and books. Please PM me if you need help about resources.
Options in the Script
Box size is one of the most important part of Point and Figure Charting. Chart price movement sensitivity is determined by the Point and Figure scale. Large box sizes see little movement across a specific price region, small box sizes see greater price movement on P&F chart. There are four different box scaling with this tool: Traditional, Percentage, Dynamic (ATR), or User-Defined
4 different methods for Box size can be used in this tool.
User Defined: The box size is set by user. A larger box size will result in more filtered price movements and fewer reversals. A smaller box size will result in less filtered price movements and more reversals.
ATR: Box size is dynamically calculated by using ATR, default period is 20.
Percentage: uses box sizes that are a fixed percentage of the stock's price. If percentage is 1 and stock’s price is $100 then box size will be $1
Traditional: uses a predefined table of price ranges to determine what the box size should be.
Price Range Box Size
Under 0.25 0.0625
0.25 to 1.00 0.125
1.00 to 5.00 0.25
5.00 to 20.00 0.50
20.00 to 100 1.0
100 to 200 2.0
200 to 500 4.0
500 to 1000 5.0
1000 to 25000 50.0
25000 and up 500.0
Default value is “ATR”, you may use one of these scaling method that suits your trading strategy.
If ATR or Percentage is chosen then there is rounding algorithm according to mintick value of the security. For example if mintick value is 0.001 and box size (ATR/Percentage) is 0.00124 then box size becomes 0.001.
And also while using dynamic box size (ATR or Percentage), box size changes only when closing price changed.
Reversal : It is the number of boxes required to change from a column of Xs to a column of Os or from a column of Os to a column of Xs. Default value is 3 (most used). For example if you choose reversal = 2 then you get the chart similar to Renko chart.
Source: Closing price or High-Low prices can be chosen as data source for P&F charting.
Chart Style: There are 3 options for chart style: “Candle”, “Area” or “Don’t show”.
As Area:
As Candle:
X/O Column Style: it can show all columns from opening price or only last Xs/Os.
Color Theme: different themes exist => Green/Red, Yellow/Blue, White/Yellow, Orange/Blue, Lime/Red, Blue/Red
Show Breakouts is the option to show Breakouts
This tool detects & shows following Breakouts:
Triple Top/Bottom,
Triple Top Ascending,
Triple Bottom Descending,
Simple Buy/Sell (Double Top/Bottom),
Simple Buy With Rising Bottom,
Simple Sell With Declining Top
Catapult bullish/bearish
Show Horizontal Count Targets: Finds the congestion or consolidation pattern and if there is breakout then it calculates the Target by using Horizontal Count method (based on the width of congestion pattern). It shows how many column exist on congestion area. There is no guarantee that prices will reach the target.
Show Vertical Count Targets: When Triple Top/Bottom Breakouts occured the script calculates the target by using Vertical Count Method (based on the length of the column). There is no guarantee that prices will reach the target.
For both methods there is auto target cancellation if price goes below congestion bottom or above congestion top.
trend is calculated by EMA of closing price of the P&F
Whipsaw protection:
Last options are “Show info panel” and Labeling Offset. Script shows current box size, reversal, and recommanded minimum and maximum box size. And also it shows the price level to reverse the column (Xs <-> Os) and the price level to add at least 1 more box to column. This is the option to put these labels 10, 20, 30, 50 or 100 bars away from the last bar. Labeling content and color change according to X/O column.
do not hesitate to comment.
Whipsaw
Ultra CMF + Stoch. and Choppiness IndexThis is a fairly complex, but powerful indicator that combines 3 different indicators.
1. Chaikin Money Flow (CMF)-
Oscillator that uses the sum of Money Flow Volume (MFV) values over n periods to determine and compare the amount of
buying/selling pressure. We modified the CMF's scale so that values fluctuate between {-100, 100} for easier visualization.
If (CMF > 0)
then (buying pressure > selling pressure)
If (CMF < 0)
then (buying pressure < selling pressure)
Thus, CMF can be a valuable tool for confirming both uptrends and downtrends, as well as identifying divergences as a negative CMF
value in the midst of an uptrend indicates lack of strength.
In addition, we set bounds for the CMF values to prevent whipsaws during periods of horizontal price movement.
The CMF is shown on the bottom of the chart as the teal and fuchsia histogram.
Teal bars means (CMF < 0) and fuchsia bars means (CMF > 0).
2. Choppiness Index -
The Choppiness Index is another oscillator that works synergistically with the Chaikin Money Flow to prevent entries during choppy
conditions (when there is no clear trend direction and movement is horizontal). Although it is blind to the actual direction of the
price movement, we use it to distinguish periods of consolidation from "trendy" markets. Values fluctuate between {0, 100}, with 50
acting as the center-point. We've also set thresholds for chop values that are utlized to optimize entry and exit timing.
The Choppiness Index is plotted as the green and pink circle line at the top of the chart. If movement is choppy(choppy > 50), then
circles are pink. If choppiness is low(chop < 50), then the circles are green.
3. Fast and Slow Stochastics -
Lastly, we use a fast and a slow stochastic momentum oscillator. This is a fairly common approach, as it allows us to detect signals
on a wider range of sensitivity.The slow stochastic confirms the high quantity of signals generated by the more hyper-sensitive
fast stochastic.
The fast and slow K and D values are not plotted on the graph by default, but users can change that in the inputs to choose which
ones to show on the graph(as shown in the bottom pane). The upper and lower bounds can also be chosen to increase/decrease
signal sensitivity.
All values such as lengths, bounds, etc. can be changed by users through the input options.
The Graph:
Chaikin Money Flow - Shown as the teal and pink zero-centered oscillator at the bottom of the chart. Bars are teal when CMF is less than
zero and fuchsia when CMF value is greater than 0. Users can choose whether the CMF is plotted by changing the 'plotCMF' input.
-The CMF histogram is shown in the second and third panes.
Choppiness Index - Plotted as the pink and teal line of circles at the top of the chart. Circles are pink if they are above 50 (high chop) and
teal when they are below 50 (low chop). Users can choose whether it is plotted through the 'plotChop' input.
-The Choppiness Index is shown in the second and third panes.
Stochastics - Not plotted by default, but users can choose to have them shown by adjusting the values in the input options menu. If you want,
there is an option to plot both fast and slow K and D values (4 total lines) and the upper and lower bounds that are used to determine entries
and exits.
NOTE: I tried to show all the ways that you can choose to display all the different indicators in the different panes, but there are a million
different ways you can choose to have the chart laid out through changing the inputs. You could have it be as simple as plotting just the 'B'
and 'S' for entries and exits or a complex graph with the CMF, Chop, and stochastics all plotted together.
HOW TO USE:
There is a set of conditionals for each of the three indicators to determine both entry and exit points. To simplify this, we decided to divide them
into red circles for exit conditions and green squares for entry conditions.
LONG ENTRIES:
1. If the conditions for the stochastics are met, a green square is plotted at the top of the chart.
2. If the conditions for the CMF are met, a green square is plotted at the center of the chart.
3. If the conditions for Choppiness Index are met, a blue circle is plotted at the bottom.
TRADE WHEN: There is a green square at the top, green square in the middle, and a blue circle at the bottom.
A GREEN 'B' IS PLOTTED IN THE CENTER OF THE GRAPH WHEN THE ABOVE REQUIREMENTS ARE TRUE...Enter position at that point.
LONG EXIT:
1. If the conditions for the stochastics are met, a red circle is plotted at the top of the chart.
2. If the conditions for CMF are met, a red circle is plotted at the center of the chart.
3. If the conditions for Choppiness Index are met, a blue circle is plotted the bottom.
TRADE WHEN: There is a red circle at the top, red circle in the middle, and blue circle at the bottom.
A RED 'S' IS PLOTTED AT THE CENTER OF THE GRAPH WHEN THE ABOVE REQUIREMENTS ARE TRUE....Exit Position at that point.
ALERTS:
An alert is sent when all buy conditions are met, informing the trader to enter a long position.
The same is done for sell conditions.
Like I said earlier, there are tons of input options to change this indicator to fit your specific use, as well as display options. I've tailored the settings
for trading BTC/USD, but it is a very versatile indicator and can be adapted for whatever you're trading.
Repulsion Moving Average - Least Crosses MAA Moving Average With Less Whipsaws Signals
The cross of the price with a moving average is one of the easiest strategy in technical analysis and could have worked if market price wasn't so noisy (In general periods of 1 to 20 produces the most whipsaws) . So it is possible to create a moving average who can manage to escape those noisy periods and produce 0 whipsaws ?
This question was asked by one of my work colleagues and i responded : "well... almost 0".
The Motion Of A Moving Average
Moving Average estimate the Trend and will always have phase shift, they will still follow the price and cross it during high volatility or low volatility periods, and when a moving average cross the price during a low volatility period you can expect lot of crosses.
In order to fix this behaviour a simple calculation exist :
FixMa = LongPeriodMA + MediumPeriodMA - ShortPeriodMA
We can see things in that way, the medium term MA is high pass filtered (subtracted) with a short term MA and the result is summed to a long term MA. We give more reactivity to our long term MA and thus creating some kind of repulsion motion with the price. Of course this can sometimes make the filter kinda zero-lag to some price periods (when the long term MA is near the price) .
Comparison
In red a simple moving average of period 100 and in blue our repulsion moving average :
In the image the short term moving average period is 100, since the long term period of the moving average is equal to short term x 3 you could be interested to look at the comparison of our moving average with the actual long term moving average :
Less crosses, i think you can see it.
Something to notice is that its always a tradeoff between Signal Speed and Signal Numbers , a classic moving average create faster signals but also a high numbers of them, a classic trailing stop create less signals but slowest ones, our moving average is some kind of average between those indicators.
Improvement Methods - Choice of The Filter/More Terms
A bad behaviour of our filter can be fixed by using filters who tend to create less crosses with the price or by developing the formula of our filter by adding more terms as follow :
fixma = ma(Price,a) + ma(Price,b) + ma(Price,c) - ma(Price,d) - ma(Price,e)
where a > b > c > d > e . The number of subtractive terms is equal to the number of summing terms - 1.
Way To Use
This indicator can be used like any moving average with cross strategy. Can also be used as a trailing stop.
No tests have been made proving that this indicator provide support and resistance levels, such signals come from more centered indicators.
Hope you enjoy
For any questions/demands feel free to pm me, i would be happy to help you :)
Anti-flat MAExperimental MA attempting to reduce whipsaw, minimizing crosses and associated commissions.
WhipsawThe Whipsaw indicator shows the overall slope of the market with a proprietary modified slope formula for determining directional bias.