Hi all, any body help me
Elaborate your question. Noone is gonna read your mind.
thanks , my mind :
draw spanB limegreen when close > past clouds and close > past tenkansen, close > past kijunsen and close > Present clouds, spanA > spanB :
#include <Indicators/Trend.mqh>
CiIchimoku*Ichimoku;
//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 9
#property indicator_plots 1
#property indicator_type1 DRAW_LINE
#property indicator_color1 LimeGreen
#property indicator_width1 2
double sp1tl[];
double sp2tl[];
double trendtang[];
double tenqk[];
double kijqk[];
double sp1ht[];
double sp2ht[];
double sp1qk[];
double sp2qk[];
void OnInit()
{
Ichimoku = new CiIchimoku();
Ichimoku.Create(_Symbol,PERIOD_CURRENT,9,26,52);
SetIndexBuffer(0,trendtang,INDICATOR_DATA);
SetIndexBuffer(1,sp1tl,INDICATOR_DATA);
SetIndexBuffer(2,sp2tl,INDICATOR_DATA);
SetIndexBuffer(3,tenqk,INDICATOR_DATA);
SetIndexBuffer(4,kijqk,INDICATOR_DATA);
SetIndexBuffer(5,sp1ht,INDICATOR_DATA);
SetIndexBuffer(6,sp2ht,INDICATOR_DATA);
SetIndexBuffer(7,sp1qk,INDICATOR_DATA);
SetIndexBuffer(8,sp2qk,INDICATOR_DATA);
IndicatorSetInteger(INDICATOR_DIGITS,_Digits+1);
//--- sets first bar from what index will be drawn
PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,51);
//--- lines shifts when drawing
PlotIndexSetInteger(0,PLOT_SHIFT,25);
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int start;
//---
if(prev_calculated==0)
start=0;
else
start=prev_calculated-1;
//--- main loop
for(int i=start; i<rates_total && !IsStopped(); i++)
{
MqlRates PArray[];
int Data=CopyRates(_Symbol,_Period,0,1,PArray);
Ichimoku.Refresh(-1);
double spanAtl= Ichimoku.SenkouSpanA(0);
double spanBtl= Ichimoku.SenkouSpanB(0);
double spanAht= Ichimoku.SenkouSpanA(-25);
double spanBht= Ichimoku.SenkouSpanB(-25);
double spanAqk= Ichimoku.SenkouSpanA(-51);
double spanBqk= Ichimoku.SenkouSpanB(-51);
double tenkanqk= Ichimoku.TenkanSen(-25);
double kijunqk= Ichimoku.KijunSen(-25);
sp1tl[i]=spanAtl;
sp2tl[i]=spanBtl;
tenqk[i]=tenkanqk;
kijqk[i]=kijunqk;
sp1ht[i]=spanAht;
sp2ht[i]=spanBht;
sp1qk[i]=spanAqk;
sp2qk[i]=spanBqk;
if(
sp1tl[i]>=sp2tl[i]
&& close[i]>tenqk[i]
&& close[i]>kijqk[i]
&& close[i]>sp1ht[i]
&& close[i]>sp2ht[i]
&& close[i]>sp1qk[i]
&& close[i]>sp2qk[i]
)
{
trendtang[i]=sp2tl[i];
}
else
{
trendtang[i]=EMPTY_VALUE;
}
}
//---
return(rates_total);
}

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use