Trend Line XrossTrend Line Xross (TLX) Uses User Input Points to draw trendlines and displays the exact intersection point of those trendlines.
This is the public indicator of the practical application for this intersection method included in my entry for Pinefest #1.
To determine the exact intersection point I am using the y-intercept method as seen below.
The code is notated for more information on the technical workings.
One difference to note between this version and the pinefest version is that I had to change the line drawings to use bar_index values so that I can use line.get_price() to grab the current value of the line to make alerts from.
Additionally, there are alerts built-in to this version for every type of cross on all of the visible lines.
Enjoy!
Intersection
intersectLibrary "intersect"
Find Line Intersection X/Y coordinates.
Simple to use, will find intersection if it exists on the segments
if the line segments do not cross on segment, an 'na' value will be returned
if you plot new items with the output coords, they still plot.
avoid this by setting a na(x) condition before plotting new items
get(l1, l2, ( optional _round) )
line intersection coordinates
Parameters:
l1 : (line) first line
l2 : (line) second line
_round : True to make an INT for plotting
if not used, will not round ( overload loophole)
Returns: with x as int if bool is used
Simple EMA_Hull_RSI StrategyAnother simple strategy. Crossing EMA & Hull MA and the level of RSI (overbought/oversold) defines long or short.
Can be improved by varying the parameters and adding take profit / stop loss.
Backtest: ETHUSD (Bitmex): 5m