steadforwardx

TrendLine I3-TL

Idea:
Draw a trendline that can set an alert every time the price cross over/under.

Concept:
(Note that we take the close to get the closing price).
-Determine the coordinates of 2 points of the line AB: A(x1;y1); B(x2;y2).
-Apply Oxy geometry to the chart with price as Oy axis, time as Ox axis. Use linear equations to determine:
+If point's x > line's x, the point is to the right of the line.
+If point's x < line's x, the point is to the left of the line.
+If point's x == line's x, the point is on the line.
-Determine when the price is crossOver or crossUnder the trend line, display that time on the chart and send an alert.

How it works:
1. Input value to config the line by manually:
- Y1: Price 1 as point 1.
- X1: Time at point 1.
- Y2: Price 2 as point 2.
- X2: Time at point 2.
X2 (To date) must be after X1 (From date).
Please consider time (hour, minute) if timeframe < 1hour.

Then draw a line on the pouring table with straight line AB as solid line, extended line as broken line. Logic will start from dashed line (To date in input).
If the price changes value from side to side of the line, show the text label, change the background color accordingly (blue top, red bottom),
also sends an alert ("CrossUnder"; "CrossOver").

2. The indicator's operating range is limited to 500 bars from the "From date" bar. When reaching to the outside, it will show a yellow warning with outbound message.

3. Set alert for this indicator, it will send alert follow 1. condition.


Suitable time frames:
5m, 15m, 1h, 4h, 1D

* Please note that this logic does not attempt to predict future prices or 100% accurate signal.
This is FREE indicator.
(Please direct message or visit website if you want to try another invite-only indicators)
Hope you guys enjoy!

Examples:
GOLD 1D

EURUSD 1H

Mã được bảo vệ
Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ. Bạn không thể xem hoặc sửa đổi mã nguồn.
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?