Realtime Divergence for Any Indicator - By John BartleThe main purpose of this script is to show historical and real-time divergences for any oscillating indicator. The secondary purpose is to give the user a lot of precise control over identifying divergences and determining what they are. This is an improved version of my other script which is similarly called "Realtime Divergence for Any Indicator"
There are four types of divergences that are offered:
Bull divergence
Hidden bull divergence
Bear divergence
Hidden Bear divergence
There are three types of potential(real-time) divergences which include:
1) Without right side bars for rightside pivots. Plus without waiting for the rightside pivot bar to complete
2) Without right side bars for rightside pivots. Plus with waiting for the rightside pivot bar to complete
3) With right side bars for rightside pivots. Plus without waiting for the rightside pivot right-most bar to complete
A definite divergence occurs when all specified bars are accounted for and fully formed.
Potential divergences use dashed lines and definite(historical) divergences use solid lines.
In addition to several other categories of settings to filter out unwanted divergences or manipulate the search process, this script also offers Alerts. Remember that alerts must not only be set within this scripts settings but also your "Alerts" panel on your right. It's strange but BOTH must be set for alerts to work...
Other interesting Things To Know:
1)I actually don't trade and so I have no need of a paid account. Unpaid accounts don't have the playback feature so I haven't really tested this script out very well. Sorry. Just let me know if something seems off and IF I have time I'll try to fix it.
2)Keep in mind that Pinescript limits the number of lines that can be shown at one time. This means that if your settings allow for a large number of divergence lines they will be removed from the leftward side of your chart but appear in the rightward side.
3) The time and the values for the price or oscillator are not the same things as each other nor are they physical things with physical space. This means that slopes of lines using the time as X and value as Y can not have definite angles. Consequently, under the setting "DIVERGENCES: SLOPE ANGLE EXCLUSION" YOU have to decide what slope equals what angle by using the setting called "Normalization Factor".
4) Remember that some individual settings apply to both the oscillator and price chart. This means that even if the setting's conditions are fulfilled in one they may not be fulfilled in the other.
5) Under the category "DIVERGENCES: INTERSECTION ALLOWANCE", if you set the "Measurement Type" to Relative Percentage then FYI any single given length will equate to an increasingly smaller percentage the further away from zero it is. Because of this, I think "Reletive Percentage" is probably only useful for price charts or oscillators with big values. Maybe >200 is OK ?
Errors:
1) If you get the error mentioning that the script must complete execution within X amount of time, this is because this is a big script and sometimes takes longer than your service plan's allotted time limit. You can just disable some of the settings to reduce the scripts amount of work and time. The biggest time savers will be to disable some lines and labels
2) If you get an error saying the script accessed a negative index(e.g. ) then try temporarily increasing the "Add More Array Elements" setting to 100-200. Sometimes it fixes the problem.
3) You may sometimes temporarily get an error that reads: "Pine cannot determine the referencing length of a series. Try using max_bars_back in the study or strategy function".
If this happens there are several things that you can do:
3A) Create a copy of my script. Then edit the section of code that looks like this ")//, max_bars_back = INSERT_YOUR_QUANTITY_HERE)" and transform it to look like this new code ", max_bars_back = INSERT_YOUR_QUANTITY_HERE)" then repeatedly try replacing "INSERT_YOUR_QUANTITY_HERE" with an increasingly larger number greater than 244 but less than 5000.
This method will increase your system resources and could cause other problems. Try changing the code back after a few hours and see if all is well again. It is a Pinescript limitation issue and happens when certain functions or variables don't get used at least once within the first 244 bars.
3B) Adjust your settings to hopefully find a divergence within the first 244 bars. If one is found then the problematic variables or functions should get used and the Pinescript 244 bar limitation should be temporarily resolved.
3C) Wait for X number of new bars to occur. If a divergence is eventually found within the first 244 bars that should solve the issue.
Tips:
1) If the amount that a setting changes value is undesirable for each time you click it then you can change that amount in the code. To do that, you'll need your own copy of my script. To make your own copy just click on "create a working copy" in the brown colored strip area above the code. Then within approximately the first 108 lines find the title of the setting you want to change. Then look to it's right to find the parameter called "step =". Change what the step equals to whatever you want. FYI, you can hover your mouse over the blue colored code and a popup will tell you what parameters(i.e. settings) that function(e.g. "input.int()") has available.
Real
Real Price Line + Dots (for Heikin Ashi)Real Price Line + Dots (for Heikin Ashi)
This indicator is designed for use on Heikin Ashi charts. Its purpose is to enable traders to benefit from price averaging and smoothing effects of Heikin Ashi candles whilst also enabling them to see the current real price line, and optionally, real price close dots on the Heikin Ashi candlesticks.
Features include:
- Optional real price line
- Optional real price close dots
- Customisable colours
- Customisable line style
- Customisable line width
What are Heikin Ashi candles?
Heikin Ashi means 'average bar' in Japanese, Heikin Ashi charts do not show real price as standard, due to the way the Open, High, Low and Close values are calculated using averages, This is done in order to create a smoother appearance and reduce the market 'noise'.
You can read more about Heikin Ashi candlesticks here.
NOTE:
- If real price dots appear behind the candles, you may need to select the triple dot menu on the indicator then select "Visual order" > "Bring to front" , so that the dots are shown above the candles.
- When using this indicator on a Heikin Ashi chart, the standard Tradingview price line will not show accurate real price. Therefore when using the price line in this indicator, the standard price line should be disabled within the Tradingview 'Chart settings' dialog > 'Symbol' tab > uncheck 'Last', under the 'Price line' section.
Pocket Pivot with extrapolated Volume and Moving AveragesThe script shows historical pocket pivots, much as other scripts with a green diamond shape on the volume pane.
When the market is open, the current bar, however, is extrapolated to the end of the day using a sixth-order polynomial.
Thus real-time pocket pivots are shown. To work properly, the user must input a time-zone offset parameter; the default is west coast USA.
Time-zone offset is -12 hours to +12 hours compared to the NYSE exchange time zone (USA west coast: -3.)
The volume extrapolation polynomial is based on a historical NASDAQ intraday volume model developed locally by a team.
Only ten-day lookback pocket pivots are computed as defined initially by Dr. Chris Kacher. (The default lookback can be changed by the user.)
Only pocket pivots are shown where the low of the daily bar is within user-defined proximity to the 50-day moving average or 10-day moving average (for continuation pocket pivots.)
BINANCE_Minimum_qty_for_tradingWe can not buy just 0.001ETH in Binance on 2022.8.8
Why? Binance have trading role about the minimum qty of coins.
Until now, we can not find the info in TradingView.
I hope Our TradingView give us this updating info easily oneday.
I am not a good English speaker.
Sorry about my short explanation.
reference: www.binance.com
Real Momentum Osc.An earlly oscillator. Sometimes It mat be dangerous. Be careful please. I just combined TSI, WMA, Stochastic.
MACD 50x Leveraged Short Strategy with Real Equity
Hello there ,
Short version of the Macd Long strategy.
MACD Long strategy:
Adding margin: Forbidden or not specified. (Add Margin : No)
Position size: (for each trade) 1%
Stop-Loss: (2% Above Entry Level)
Long: macd crossunder
Exit: macd crossover
Or ofc touching the stop-Loss value as predicted.
These strategies are just examples.
The goal is to observe true equity and equity change.
Warning: This strategy simulation is for Short direction only.
Regards.
MACD 50x Leveraged Long Strategy Results with Real Equity Hello there.
I was looking for a way to simulate leveraged transactions in Tradingview and this script came out.
You can examine the equity graph without looking at the strategy results.
Thus, the facts will come to light.
Strategy parameters:
Adding margin: Forbidden or not specified. (Add Margin : No)
Position size: (for each trade) 1%
Stop-Loss: (2%)
Long: macd crossover
Exit: macd crossunder
Or ofc touching the stop-Loss value as predicted.
Warning: This strategy simulation is for Long direction only.
Regards.
Bitcoin Real VolumeBitcoin’s Real Volume
An accurate read on the change in Bitcoin’s volume profile over time.
Based on 2019 reports by Bitwise and Alameda Research.
Please see the script code notes for assumptions and details on data selection.
Follow me for more information on this script.