OPEN-SOURCE SCRIPT
IPDA Time (3, 6, 9) [Final v3]

This Pine Script code defines a custom TradingView indicator called "IPDA Time (3, 6, 9)". It is designed to identify specific bars on the chart where the digital root of the current time (hour and minute) equals 3, 6, or 9, which are numbers often associated with cycles and market timing concepts in trading.
1. What the Code Does
The script calculates two main time values based on a concept known as the Digital Root (also called the "Digital Sum").
The Digital Root Function
The core logic uses a custom function, getDigitalRoot(number), which calculates the digital root of any number. The digital root is the single digit obtained by an iterative process of summing the digits of a number, repeatedly until a single digit is reached (e.g., the digital root of 48 is 4+8=12→1+2=3).
Signal Calculations
The script extracts the individual digits from the current chart's hour and minute (h, m) and performs two distinct digital root calculations:
hourPlusMinuteValue (High Confluence Check): Calculates the digital root of the sum of all four digits (two from the hour, two from the minute).
minuteOnlyValue (Minute Check): Calculates the digital root of the sum of the two minute digits only.
Logic and Signal Generation
The code generates three types of signals based on whether these digital roots equal 3, 6, or 9:
High-Importance (Green Square): Generated when BOTH the "Hour + Minute" check (isHourPlusMinuteSignal) and the "Minute Only" check (isMinuteOnlySignal) are true.
Hour + Minute Only (Blue Diamond): Generated when ONLY the "Hour + Minute" check is true.
Minute Only (Yellow Diamond): Generated when ONLY the "Minute Only" check is true.
2. Visual Output on the Chart
The indicator visualizes these signals directly on the price chart:
Signal Type Shape (Style) Color Location Additional Effect
High-Importance Square (shape.square) Green Above Bar Changes the bar's color to green (with 75% transparency).
Hour + Minute Only Diamond (shape.diamond) Blue Above Bar N/A
Minute Only Diamond (shape.diamond) Yellow Above Bar N/A
Export to Sheets
The visual markers appear above the bar/candle that corresponds to the specific time criteria being met, highlighting moments the indicator's logic deems significant.
Tools
1. What the Code Does
The script calculates two main time values based on a concept known as the Digital Root (also called the "Digital Sum").
The Digital Root Function
The core logic uses a custom function, getDigitalRoot(number), which calculates the digital root of any number. The digital root is the single digit obtained by an iterative process of summing the digits of a number, repeatedly until a single digit is reached (e.g., the digital root of 48 is 4+8=12→1+2=3).
Signal Calculations
The script extracts the individual digits from the current chart's hour and minute (h, m) and performs two distinct digital root calculations:
hourPlusMinuteValue (High Confluence Check): Calculates the digital root of the sum of all four digits (two from the hour, two from the minute).
minuteOnlyValue (Minute Check): Calculates the digital root of the sum of the two minute digits only.
Logic and Signal Generation
The code generates three types of signals based on whether these digital roots equal 3, 6, or 9:
High-Importance (Green Square): Generated when BOTH the "Hour + Minute" check (isHourPlusMinuteSignal) and the "Minute Only" check (isMinuteOnlySignal) are true.
Hour + Minute Only (Blue Diamond): Generated when ONLY the "Hour + Minute" check is true.
Minute Only (Yellow Diamond): Generated when ONLY the "Minute Only" check is true.
2. Visual Output on the Chart
The indicator visualizes these signals directly on the price chart:
Signal Type Shape (Style) Color Location Additional Effect
High-Importance Square (shape.square) Green Above Bar Changes the bar's color to green (with 75% transparency).
Hour + Minute Only Diamond (shape.diamond) Blue Above Bar N/A
Minute Only Diamond (shape.diamond) Yellow Above Bar N/A
Export to Sheets
The visual markers appear above the bar/candle that corresponds to the specific time criteria being met, highlighting moments the indicator's logic deems significant.
Tools
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.