Can somebody help me?? I comment value lineup and linedown ok, but ea can’t work.
/* Setup indicator
IndicatorBuffers(4);
HalfLength = MathMax(HalfLength, 1);
SetIndexBuffer(0, Gda_132);
SetIndexDrawBegin(0, HalfLength);
SetIndexBuffer(1, Gda_136); / red lineup
SetIndexDrawBegin(1, HalfLength);
SetIndexBuffer(2, Gda_140); /blue linedown
SetIndexDrawBegin(2, HalfLength);
SetIndexBuffer(3, Gda_144);
*/
void OnTick()
{
double lineup=iCustom(NULL,0,“Myindi”,1,0);
double linedown=iCustom(NULL,0,“Myindi”,2,0);
Comment("up " + (string)lineup + " down " + (string)linedown);
if(Ask<linedown) // Here is your open buy rule
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,0,500,500,"EA",MagicNumber,0,Blue);
}
if(Bid>lineup) // Here is your open Sell rule
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,0,500,500,"EA",MagicNumber,0,Red);
}
}