taylor_o

level_stats

taylor_o Mis à jour   
This script tells you the percentage of time an instrument's closing value is above and below a level of your choosing. The background color visually indicates periods where the instrument closed at or above the level (red) and below it (blue). For "stationary-ish" processes, you can get a loose feel for the mean, high, and low values. The historical information conveyed through the background coloring can help you plan derivatives trades. Try with your favorite pairs, commodities, or volatility indices.

Usage: pick a level of interest using the input.
Notes de version:
Added a histogram to depict the distribution of closing prices. Prices less than the "level" input are blue, while those above the level are red. This color scheme is also used to color the chart background.
Notes de version:
removed some debug code
Notes de version:
added mean, median, and stdev
Notes de version:
Added a date selection. The statistics and histogram will reflect only the period [ start, end ).
Notes de version:
added a horizontal line (light red) to indicate the level
Notes de version:
The histogram's width, height, and number of buckets are now adjustable inputs. More buckets will make the histogram somewhat smoother and more detailed, but at the cost of performance. The maximum number of buckets is probably around 80. The width and height units are "percentage of the screen".

I have set the defaults at levels that perform reasonably well.
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?