OPEN-SOURCE SCRIPT

Support & Resistance with MA Cross Buy/Sell

Support and Resistance Levels:
Support Level: This is calculated by finding the lowest price (low) over a specified period (supportLength). This represents the level where the price tends to bounce upwards.
Resistance Level: This is calculated by finding the highest price (high) over a specified period (resistanceLength). This represents the level where the price tends to reverse downwards.
Plotting: The support and resistance levels are plotted on the chart with green and red lines, respectively.

Moving Averages (MA):
Short MA: A simple moving average (SMA) calculated over a short period (shortMA_length).
Long MA: A simple moving average (SMA) calculated over a longer period (longMA_length).
Plotting: The short MA is plotted in blue, and the long MA is plotted in orange on the chart.

Buy and Sell Signals (MA Cross):
Buy Signal: A buy signal occurs when the short MA crosses above the long MA (crossover function), and the price closes above the support level.
Sell Signal: A sell signal occurs when the short MA crosses below the long MA (crossunder function), and the price closes below the resistance level.
Plotting: Buy signals are displayed below the bars with the text "BUY" in green, and sell signals are displayed above the bars with the text "SELL" in red.
buysellsignalforecastingindicators

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal