OPEN-SOURCE SCRIPT

Clone Pivots. Oct_2023

已更新
Conceptually very simple.

The all time high or low of the chart (this indicator can be used with non-price sources as well), is used to divide the price pane continuously by 2.

For example the first pivot is (All Time High + All Time Low)/2.

From this point the price chart is further divided by 2.

The user can set the depth of division, and the lines for depth are only shown around the price.

About clone pivots.
- they can be used for ladder trading
- they are based on the range of the stock or instrument price

An alternative is available to use Fib divisions rather than simple divide by 2 method.

Labels may be placed with price or without. And depth of labelling is also an option.

Clone pivots at 50% tend to work very well with price structures - give it a try and see if it helps your trading!

Pine source uses UDTs, Methods, Arrays and Maps.
版本注释
This update includes
- more ability to modify the appearance of labels
- tooltips and better organization of the settings dialog
- better documentation of the source
- rewritten to leverage the speed of maps vs arrays
版本注释
Some major updates for the community:
  1. tightened up the script to speed processing in an number of areas
  2. updated the drawing method so no change in levels only changes the coordinates
  3. added more comments to the source script
  4. added the ability to show labels only for median levels
  5. updated the settings to be more self explanatory
版本注释
Minor Update to limit label and line drawing to visible high and low of the chart. There were some cases when auto size was set where the line drawing was causing chart compression.
版本注释

This update to:
  • use symbol all time high and all time low regardless of the chart timeframe
  • adds a switch to turn on or off limiting lines to visible chart range


Some more notes on how to trade it and settings.

Traders would use clone pivots:

as a ladder for scaling in and out of a position
set TP's or potential entries at levels


The Setup allows for the source of high and low to be from a non-price source such as an oscillator. The last source input is used to setup up the levels closest to the price and keep the line clutter to a minimum on the chart.

There is also another switch to keep line clutter down - it will only display levels in the visible range of the pane. At times TV auto scale will scale all the drawn lines into the pane and that causes problems - these seems intermittent so a switch is available to help with that.

Labels have a whole set of options available, from placement on the level line, to how they are presented (above, center or below the line) to the size of the font. There is also a choice to use price vs just ratio on the label.

If the level depth is set to N, to reduce potential clutter labels can be turned off at a specified depth and another choice just to label the median or 50% line at lower depths.

In terms of pine a few techniques are used:

UDT and Methods
Maps
Drawing objects, lines and labels.


The script is optimized to reduce the loop lengths and reduce redrawing all lines and labels to only when necessary and otherwise update the coordinates.

I hope this is useful to the community for both it's trading value and pine techniques used.
版本注释
Quick fix for applying to indicators with negative values or no long term historical values.
educationalPivot PointsPivot points and levels

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明