OPEN-SOURCE SCRIPT

Trendlines - JD

업데이트됨
This script draws trendlines from the pivot points in the price chart.

The input for the function that draws the trendlines is any calculation or function (eg. pivot points),
that most of the time and occasionally produces a 'non n/a' value.
The trendline function then connects the non n/a values and axtends the connections of those points in a trendline.

There is an option to draw the lines from the wicks or from the 'real bodies' of the candles.
The trendlines can either extend infinitely or only run for an adjustable amount of bars.

JD.
릴리즈 노트
Added option for log charts.

JD.
릴리즈 노트
Added some functionality from my v3 trendline script!

Added the option to display trendline breaks, NOTE: this is still "semi-Beta", awaiting new Pinescript functionality to do this more elegantly ;-)
you can set the number of past trendlines to check breaks against to avoid excessive cluttering of the chart.

Added alerts for the breaks.

Added the option to display trendlines in color or monochrome.

JD.
릴리즈 노트
Added the option to filter out break signals.

You can chose so the script only gives "Long" break signals when price break upwards of a trendline formed by the highs and
only gives "Short" break signals when price break downwards of a trendline formed by the lows.

NOTE: when you experience 'ghost' signals, where you see a break, but don't see a trendline, then most of the times this is caused by a trendline fromed by two points that are not visible in the current viewport of the chart.
(this is a limitation TradingView built in to reduce the load on their servers)


To remedy this, I advise:

WHEN YOU FIRST PUT UP THE TRENDLINE SCRIPT, ZOOM ALL THE WAY OUT AND SCROLL ALL THE WAY LEFT!
Then all possible trendlines schould be visible.
Then you can zoom and scroll back to the part you want to see and the lines should stay in place.


JD.
릴리즈 노트
small code correction, bigger update coming!
릴리즈 노트
FINALLY GOT TO LIMITING THE AMOUNT OF LINES SHOWN, TO CLEAN UP THE CHART!
(not perfect yet, but much cleaner allready!!)


ENJOY!!

Gr, JD.
릴리즈 노트
MAJOR UPDATE WITH ARRAYS !!

To keep track of the high and low pivot points and the time of occurence, these values are stored in a custom DATAFRAME ARRAY.
This dataframe structure basically turns the standard 1 dimensional Pinescript arrays in a structured 3D dataframe!

!! Feel free to use the df structure in other scripts if you so desire, however a little shoutout would be nice!! ;-)


//////////////////////////////////
/ BASIC INFO ON THE DATAFRAME: ///
//////////////////////////////////

The df is set up as an EXCELL workbook and is devided in SHEETS, ROWS/RECORDS and COLUMNS.

With the use of some purpose-built functions, values can be placed or retrieved in a specific column of a certain row on a certain sheet
this can be done by intuitively using sheet_nr, row_nr and column_nr coördinates,
without having to worry on what exact index of the Pine array this value is located (the functions do these conversions for you)


the syntax I propose for the 3D dataframe array has the following structure:

- the array starts with 3 VALUES describing the DIMENSION INFORMATION, (nr of sheets, rows, columns)
these are ignored in the actual calculations and serve as a metadata header (similar to the "location, time,... etc." data that is stored in photo files)
so the array always carries it's own info about the nr. of sheets, rows and columns and doesn't need is seperate "info" file!

To stay consistent with the standard Pinescript (array and [lookback]) indexing:
- indexes for sheets and columns start from 0 (first) and run up to the (total nr of sheets or columns) - 1
- indexes for rows also start from 0 (most recent, cfr.[lookback]) and run up to the (total nr of rows) - 1

- this 3 value metadata header is followed by the actual df data
the actual data array can consist of (100,000 - 3) usable items,

In a practical example, you can have a df with 3 sheets, containing 6,666 rows with each 5 columns of data (eg. open, high, low, close, volume) in it!!!

Enjoy!

Gr, JD.
Trend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


Disclaimer.
I AM NOT A FINANCIAL ADVISOR.
THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
ALWAYS DO YOUR OWN RESEARCH!
JD.

You can contact me for info/access in PM or on Telegram: @jduyck
PLS, DON'T ASK FOR ACCESS IN THE COMMENT SECTION!
또한 다음에서도:

면책사항