[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 77

 

How can I prevent the indicator from displaying the 0.0 level in a separate window?

is the indicator value and 0 overlapping?

 
TVA_11:

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.
 
TVA_11:

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);

  }

 
KoOr:

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);

  }


First of all, only one order can open, because if OrderTotal()==0 and only at 00:00 server time.
 

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);

  }

 
KoOr:

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.
 
KoOr:

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);

  }

This construction(ma0 > ma1 > ma2) is not provided in MQL4. It should be replaced with: ma0>ma1 && ma1>ma2.
 
Sepulca:

If you already have at least one order open, no matter where, no matter what, no new order will open.
There is not a single order open and none will open
 
To KoOr : symbol name for OrderSend function must be a string