Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How can I prevent the indicator from displaying the 0.0 level in a separate window?
is the indicator value and 0 overlapping?
How can I prevent the indicator from displaying the 0.0 level in a separate window?
is the indicator value and 0 overlapping?
How do you find out, let me know. I'm in the way too.
How can I prevent the indicator from displaying the 0.0 level in a separate window?
is the indicator value and 0 overlapping?
Assign EMPTY_VALUE instead of 0
Please tell me why orders are not opening
extern int sl=60;
extern int tp=180;
double ma0,ma1,ma2;
int start()
{
ma0=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0);
ma1=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,2);
if(OrdersTotal()==0 && Hour( ) ==0 && Minute( ) ==0 && ma0 > ma1)
OrderSend(NULL,OP_SELL,0.1,Bid,3,Ask+sl*Point,Ask-tp*Point,"",332,0,Blue);
}
Please tell me why orders are not opening
extern int sl=60;
extern int tp=180;
double ma0,ma1,ma2;
int start()
{
ma0=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0);
ma1=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,2);
if(OrdersTotal()==0 && Hour( ) ==0 && Minute( ) ==0 && ma0 > ma1)
OrderSend(NULL,OP_SELL,0.1,Bid,3,Ask+sl*Point,Ask-tp*Point,"",332,0,Blue);
}
Removing the opening time, but still the orders do not open
extern int sl=60;
extern int tp=180;
double ma0,ma1,ma2;
int start()
{
ma0=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0);
ma1=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,2);
if(OrdersTotal()==0 && ma0 > ma1 > ma2)
OrderSend(NULL,OP_SELL,0.1,Bid,3,Ask+sl*Point,Ask-tp*Point,"",332,0,Blue);
}
Removing the opening time, but still no orders open
extern int sl=60;
extern int tp=180;
double ma0,ma1,ma2;
int start()
{
ma0=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0);
ma1=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,2);
if(OrdersTotal()==0 && ma0-ma1>0 && ma1-ma2>0)
OrderSend(NULL,OP_SELL,0.1,Bid,3,Ask+sl*Point,Ask-tp*Point,"",332,0,Blue);
}
If you already have no matter where, no matter what at least one order is already open, no new order will open.
Removing the opening time, but still no orders open
extern int sl=60;
extern int tp=180;
double ma0,ma1,ma2;
int start()
{
ma0=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0);
ma1=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,2);
if(OrdersTotal()==0 && ma0 > ma1 > ma2)
OrderSend(NULL,OP_SELL,0.1,Bid,3,Ask+sl*Point,Ask-tp*Point,"",332,0,Blue);
}
If you already have at least one order open, no matter where, no matter what, no new order will open.