Library "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
Biblioteca do Pine

No verdadeiro espírito TradingView, o autor publicou este código de Pine como uma biblioteca de código aberto para que outros programadores de Pine de nossa comunidade possam reutilizá-lo. Um brinde ao autor! Você pode usar esta biblioteca em particular ou em outras publicações de código aberto, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Gostaria de usar essa biblioteca?

Copie a seguinte linha e cole-a em seu script.