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.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?