Detecting Ichimoku Kijun Sen Crossover with Cloud in ProBuilder

15 Jun 2024
0 comment
0 attachment

This ProBuilder code snippet demonstrates how to identify a crossover event between the Kijun Sen line and the Ichimoku Cloud in a trading chart. The Ichimoku Cloud is a popular technical analysis tool used to gauge momentum, support, and resistance.


Tenkansen = (highest[9](high) + lowest[9](low))/2
Kijunsen = (highest[26](high) + lowest[26](low))/2
SSpanA = (tenkansen[26] + kijunsen[26])/2
SSpanB = (highest[52](high[26]) + lowest[52](low[26]))/2
//Chikou = close[26]
x = Kijunsen CROSSES OVER max(SSpanA,SSpanB)
SCREENER [x]

Explanation of the Code:

  • Tenkansen Calculation: This line computes the Tenkan-sen (Conversion Line) by averaging the highest high and the lowest low over the last 9 periods.
  • Kijunsen Calculation: Similar to Tenkansen, the Kijun-sen (Base Line) is calculated by averaging the highest high and the lowest low over the last 26 periods.
  • Senkou Span A Calculation: Senkou Span A is computed by averaging the Tenkansen and Kijunsen, both shifted 26 periods into the future.
  • Senkou Span B Calculation: Senkou Span B is calculated by averaging the highest high and the lowest low over the past 52 periods, then shifting this average 26 periods into the future.
  • Crossover Detection: The variable x is used to detect when the Kijun-sen crosses over the maximum value between Senkou Span A and Senkou Span B. This is a significant event in trading as it might indicate a potential change in market direction.
  • Screener Output: The screener function is used to filter and display symbols where the crossover condition x is true, indicating a potential trading opportunity.

This code snippet is a practical example of implementing complex technical analysis indicators in ProBuilder to identify trading signals based on the Ichimoku Kinko Hyo methodology.

Related Post

Check out this related content for more information:

https://www.prorealcode.com/topic/ichimoku-proscreener-help/#post-81050

Visit Link
What is a Snippet? A snippet is a small, reusable chunk of code designed to solve specific tasks quickly. Think of it as a shortcut that helps you achieve your coding goals without reinventing the wheel. How to Use: Simply copy the snippet and paste it into your project where needed. Don't forget to tweak it to fit your context. Snippets are not just time-savers; they're also learning tools to help you become a more efficient coder.
robertogozzi Master
Roberto https://www.ots-onlinetradingsoftware.com
Author’s Profile

Comments

Search Snippets

Showing some results...
Sorry, no result found!

Snippets Categories

global
33
indicator
132
strategy
171

Recent Snippets

How to Build a Step-Based Trailing Stop That Moves to Break-Even First
strategy
This snippet implements a step trailing stop that advances in fixed increments once price reaches predefined profit [...]
Utilizing Arrays to Track and Compare Indicator Values Within the Same Bar in ProBuilder
indicator
This ProBuilder code snippet demonstrates how to use arrays to compare the values of an indicator (RSI in this case) [...]
Calculating Break-Even Points in ProBuilder
strategy
This ProBuilder code snippet demonstrates how to calculate the break-even point for a trading position. The break-even [...]
Implementing Time and Day Restrictions in Trading Algorithms
strategy
This code snippet demonstrates how to set restrictions on trading activities based on specific days of the week and [...]
Implementing Partial Position Closure Based on Price Retracement in ProBuilder
strategy
This code snippet demonstrates how to partially close a trading position when the price retraces to a certain level in [...]
Logo Logo
Loading...