Cronex Taichi_003
Download scriptThe Cronex Taichi is a custom technical analysis tool designed to provide a visual representation of market trends and momentum by synthesizing multiple components of the popular Ichimoku Kinko Hyo system. Instead of relying on just one type of data, this script blends several core indicators to create a more comprehensive overview of price action.
Core Logic and Data Processing
The script functions by calculating four specific values from the Ichimoku system:
- Tenkan-sen (Conversion Line)
- Kijun-sen (Base Line)
- Senkou Span A
- Senkou Span B
The primary logic begins by taking these four values and calculating their mathematical average. This average creates the main "Taichi" line, which serves as the foundation for the tool’s analysis. Additionally, the script calculates a secondary line—the average of the two Senkou Spans—which is shifted forward on the chart to help identify future price sentiment.
Signal Generation and Smoothing
To filter out market noise and provide clearer direction, the script applies "Moving Average" smoothing to the primary Taichi line. It generates two distinct signal lines:
- Primary Signal: A faster-moving average that reacts more quickly to recent price changes.
- Secondary Signal: A slower-moving average that tracks the broader trend over a longer period.
By comparing the main Taichi line against these two signals, the tool helps users identify when the current momentum is aligning with or diverging from the established trend.
Equilibrium and Stability Identification
A unique feature of this script is its ability to detect "Flat" zones. The logic monitors the mathematical distance between the Taichi line, the Primary Signal, and the Secondary Signal simultaneously.
When these three components converge closely enough—meaning they are moving in near-perfect harmony or staying within a very tight range—the script identifies a state of equilibrium. Visually, this is represented by specific markers on the chart, signaling to the user that the market may be entering a period of consolidation, lack of clear direction, or a potential stabilization point before a new trend begins.
//+------------------------------------------------------------------+
//| Cronex Taichi.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, Cronex"
#property link "http://www.metaquotes.net/"
//---- indicator settings
#property indicator_chart_window
//#property indicator_separate_window
#property indicator_buffers 6
#property indicator_color1 Silver
#property indicator_color2 Red
#property indicator_color3 Lime
#property indicator_color4 DarkOrange
#property indicator_color5 DeepSkyBlue
#property indicator_color6 DeepSkyBlue
#property indicator_width1 2
#property indicator_width4 2
//---- indicator parameters
extern int Tenkan=9;
extern int Kijun=26;
extern int Senkou=52;
//---- indicator buffers
double TaichiBuffer[];
double TaichiForBuffer[];
double SignalBuffer[];
double SSignalBuffer[];
double FlatBuffer1[];
double FlatBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexStyle(2,DRAW_LINE);
SetIndexStyle(3,DRAW_LINE);
SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_DOT);
SetIndexStyle(5,DRAW_HISTOGRAM,STYLE_DOT);
// SetIndexDrawBegin(1,SignalSMA);
IndicatorDigits(Digits+1);
//---- indicator buffers mapping
SetIndexBuffer(0,TaichiBuffer);
SetIndexBuffer(1,SignalBuffer);
SetIndexBuffer(2,SSignalBuffer);
SetIndexBuffer(3,TaichiForBuffer);
SetIndexBuffer(4,FlatBuffer1);
SetIndexBuffer(5,FlatBuffer2);
SetIndexShift(3,Kijun);
// SetIndexDrawBegin(3,Kijun);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Cronex Taichi");
SetIndexLabel(0,"Taichi");
SetIndexLabel(1,"Signal");
SetIndexLabel(2,"SSignal");
SetIndexLabel(3,"TaichiFor");
SetIndexLabel(4,"Flat1");
SetIndexLabel(5,"Flat2");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{
double TenkanSen,KijunSen,SenkouSpanA,SenkouSpanB,ChinkouSpan;
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
for(int i=-Kijun; i<limit; i++)
{
// TaichiBuffer[i]=(iRSI(NULL,0,FastEMA,PRICE_OPEN,i)+iRSI(NULL,0,SlowEMA,PRICE_OPEN,i)+)/2;
// TaichiBuffer[i]=iRSI(NULL,0,SlowEMA,PRICE_OPEN,i);
TenkanSen = iIchimoku(NULL,0,Tenkan,Kijun,Senkou,MODE_TENKANSEN,i);
KijunSen = iIchimoku(NULL,0,Tenkan,Kijun,Senkou,MODE_KIJUNSEN,i);
SenkouSpanA = iIchimoku(NULL,0,Tenkan,Kijun,Senkou,MODE_SENKOUSPANA,i);
SenkouSpanB = iIchimoku(NULL,0,Tenkan,Kijun,Senkou,MODE_SENKOUSPANB,i);
ChinkouSpan = iIchimoku(NULL,0,Tenkan,Kijun,Senkou,MODE_CHINKOUSPAN,i);
if (i>=0)
{
TaichiBuffer[i]=(TenkanSen+KijunSen+SenkouSpanA+SenkouSpanB)/4;
TaichiForBuffer[i+Kijun]=(SenkouSpanA+SenkouSpanB)/2;
}
else TaichiForBuffer[i+Kijun]=(SenkouSpanA+SenkouSpanB)/2;
}
//========================== signal line counted ================
for(i=0; i<limit; i++)
{
SignalBuffer[i]=iMAOnArray(TaichiBuffer,Bars,Kijun,0,MODE_LWMA,i);
SSignalBuffer[i]=iMAOnArray(TaichiBuffer,Bars,Senkou,0,MODE_LWMA,i);
if( MathAbs(((TaichiBuffer[i]-SignalBuffer[i])+(TaichiBuffer[i]-
SSignalBuffer[i])+(SignalBuffer[i]-SSignalBuffer[i]))/3)<10*Point)
FlatBuffer1[i]=SignalBuffer[i]+15*Point;
FlatBuffer2[i]=SignalBuffer[i]-15*Point;
}
//---- done
return(0);
}
//+------------------------------------------------------------------+
Comments