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

受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?