gahankaripradyumna

find bulish patterns

In this script:

We continue to calculate the bullish engulfing condition for monthly candlesticks (engulfingConditionM) as before.

We then create two variables (engulfingConditionY and lastYear) to calculate the yearly engulfing condition.

We use an if statement to check if the year has changed compared to the previous bar. If it has, we update the engulfingConditionY variable; otherwise, we keep the previous year's value.

Finally, we plot the monthly and yearly signals on the chart.

This code allows you to work with monthly data and calculate yearly signals based on the monthly data available in TradingView. Please note that this is an approximation and not true yearly resolution data, but it's a common workaround used in TradingView Pine Script.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?