//+------------------------------------------------------------------+
//| Reveal.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp." // #property copyright is used for the ownership of the EA
#property link "http://www.metaquotes.net" // #property ownership is used for the owners website link.
input string Indicator_name = "Beast Signal";
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
datetime newbar; // the part datetime newbar; so that everytime an arrow is given it wont open a new order every tick.
int start() // this starts the engine of the code.
{
if(newbar==Time[0])return(0); //
else newbar=Time[0];
double ArrowUp = iCustom(NULL,0,Indicator_name,1,0);
double ArrowDown = iCustom(NULL,0,Indicator_name,2,0);
if (ArrowDown != EMPTY_VALUE)
{
Alert(Symbol()+"Sell Signal entry at: "+DoubleToString(ArrowDown));
}
if (ArrowUp != EMPTY_VALUE)
{
Alert(Symbol()+"Buy Signal entry at: "+DoubleToString(ArrowUp));
}
return(0); // returns back to the start function of the program.
}