if(previous_price<previous_trendline_value and price>=trendline_value
previous_price>previous_trendline_value and price<=trendline_value)
you have a touch or a cross
Previous can be previous tick, previous bar's high/low...
Thanks angevoyageur that i know. Its the part for getting trendline_value for the bars that is a challenge like if it were low price we just use Low[...] or iLow(...). Is there such a function for trendline or maybe can it be drawn using a buffer?
that was big help it isn't rude to say this, you didn't show any attempt how you tried
also angevoyageur has given a correct answer to your question
you had to ask also for how do i get trendline value you didn't and WHRoeder did already