Download MetaTrader 5
To add comments, please log in or register
Do you need private account monitoring? The Signals will provide you one!
J Webster
929
J Webster 2009.09.08 17:47 

Is this the right way t do ichimoku alerts in MQL4?

The alerts are at the bottom. I haven't figure dout a way of swapping over the senkou span/kumo cloud alerts yet apart from the alert every time the Bid price crosses.

Complete code in the attached notepad file.


//----ALERTS
//---- TS cross KS
if (Tenkan_Buffer[0] > Kijun_Buffer[0] && Tenkan_Buffer[-1] < Kijun_Buffer[-1])
{  //crossed upwards
   Alert ("TS crossed KS upwards on+ "+Symbol());}
if (Tenkan_Buffer[0] < Kijun_Buffer[0] && Tenkan_Buffer[-1] > Kijun_Buffer[-1])
{  //crossed downwards
   Alert ("TS crossed KS downwards on+ "+Symbol());}
//---- Kijun Sen Cross
if (Bid > Kijun_Buffer[0] && Close[-1] < Kijun_Buffer[-1])
{  //price crossed upwards
   Alert ("price crossed KS upwards on+ "+Symbol());}
if (Bid < Kijun_Buffer[0] && Close[-1] > Kijun_Buffer[-1])
{  //crossed downwards
   Alert ("price crossed KS downwards on+ "+Symbol());}
//---- Kumo Breakout or Senkou Span A/B Cross --- TO PUT HERE
//----  Chinkou Span Cross 
if (Chinkou_Buffer[0] > Bid && Chinkou_Buffer[-1] < Close[-1])
{  //chinkou crossed the price upwards
   Alert ("chinkou span crossed KS upwards on+ "+Symbol());}
if (Chinkou_Buffer[0] < Bid && Chinkou_Buffer[-1] > Close[-1])
{  //chinkou crossed the price downwards
   Alert ("chinkou span crossed KS downwards on+ "+Symbol());}
return(0);
  }

Files:
abmmalay
11
abmmalay 2015.04.07 10:19  

Hello my traders/coders,
I need a smmal favour, i'm one of the ichimoku lover, i have been tested ichimoku long time, just few months before i have a found a system thats work for me,here i come ask a small help, which is i need a clear alert for ichimoku indicator, the details are give below, who is helping me will be very much appriciated and and i will share my system once done,

alert type 1. tenkan - kijun cross 
up cross Green arrow with pop up window 
down cross red arrow with pop window

alrert type 2 senku span A - senkou span B cross 
senkou A cross UP Gold arrow with pop up winddow 
senkou A cross DOWN Magenta arrow with pop up window 


thanks in advance 
very eagerly looking forward my traders/ coders reply with modification

pls send abmmalay@gmail.com 

Files:
ichimoku.mq4 7 kb
whroeder1
13593
whroeder1 2015.04.07 12:21  
if (Tenkan_Buffer[0] > Kijun_Buffer[0] && Tenkan_Buffer[-1] < Kijun_Buffer[-1])
Buffer index's start at zero (current bar) 1 is the previous bar. There is no -1 (future.)
/
To add comments, please log in or register