How do I add a dashboard indicator to a robot?

 

H there ,

I want full help from programming professors.

I am trying to make EA from Fx Eagle Indicator , 

My EA working on Moving average fine

this is my cod:

//+------------------------------------------------------------------+
//|                                                                  |
//|                   Golden Dimonds EA V.01                         |
//|                                                                  |
//|                                                                  |
//+------------------------------------------------------------------+
extern int Magic1=1;

extern int Magic2=2;

extern int period=14;

extern double lot=0.1;

extern int slippage=6;

extern int stoploss=40;

extern int takeprofit=50;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
 if(Volume[0]<=1)
 {
  if(CandleOrders()==0)
  {
   if(Status()=="buy" && StatusMA()=="buy")
   {
    Pendbuy();
    }
  
   if(Status()=="sell" && StatusMA()=="sell")
   {
    Pendsell();
    }
   } 
  }
   return(0);
  }
//+------------------------------------------------------------------+
int CandleOrders()
{
int num=0;

 for(int i=OrdersTotal()-1;i>=0;i--)
 {
 OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

  if(OrderMagicNumber()==Magic1 || OrderMagicNumber()==Magic2)
  {
   if(OrderOpenTime()>=Time[0] && OrderOpenTime()<Time[0]+60*Period())
   num++;
   }
  }
return(num);
}
//-----------------------------------------------------------------
string CandleStatus()
{
if(Close[1]>=Open[1])
return("buy");
     
else
    
if(Close[1]<Open[1])
return("sell");

}
//----------------------------------------------------------------
string StatusMA()
{
double ma=iMA(Symbol(),0,period,0,MODE_SMA,PRICE_CLOSE,1);

if(Close[1]>=ma)
return("buy");
     
else
    
if(Close[1]<ma)
return("sell");

}
//-----------------------------------------------------------------
void Pendbuy()
{
OrderSend(Symbol(),OP_BUY,lot,Ask,slippage,Ask-stoploss*MathPow(10,-Digits)
,Ask+takeprofit*MathPow(10,-Digits),"www.FxNewTech.com",Magic1,0,Blue);

}
//---------------------------------------------------------------------
void Pendsell()
{
int ticket=OrderSend(Symbol(),OP_SELL,lot,Bid,slippage,Bid+stoploss*MathPow(10,-Digits)
,Bid-takeprofit*MathPow(10,-Digits),"www.FxNewTech.com",Magic2,0,Red);

}

  but this indicator include scanner to ignore the Fake indicator signal , how can I add the condition to check the scanner as well before open the position.

tanks for All.


Files:
 
  1.  if(Volume[0]<=1)

    For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.

    I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
              New candle - MQL4 programming forum #3 2014.04.04

  2. On your objects list, try list all. Then you can get their names, and text/color.

  3. Naqibjan: this is my cod:
    Cod
    Naqibjan: tanks for All.
    Tank
 
William Roeder:
  1. For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.

    I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
              New candle - MQL4 programming forum #3 2014.04.04

  2. On your objects list, try list all. Then you can get their names, and text/color.

thank you

I am very beginner in programming

I will solve the problems you mentioned

But my main problem is using this indicator (FX Eagle Dashboard)

Because the header doesn't have color, I don't know how I can add this indicator to my codes.

I ask your friends for clear help

 
Naqibjan: Because the header doesn't have color, I don't know how I can add this indicator to my codes.
  1. Don't know what a header is.
  2. You don't add it to your EA. You get values from it. And I answered that. #1.2