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.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?