one step more

 

can some one code this condition to my EA


if loss in current day <=100 pip, may open


if loss in curent day = 100, close any open position, and dont open position until tomorow


//+------------------------------------------------------------------+
//| Ichimoku.mq4 |
//| Copyright © 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

extern double Lot=0.01;
extern int SL=100; //stoploss
extern int TP=100; //takeprofit
extern int MagicNumber=12345;
extern int SP=5; //slipage


//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
double
a, //kijun-Sen
b, //tenkan-sen
c, //span-a
d, //span-b
e; // chinkou span


a = iIchimoku(NULL, 0, 9, 26, 52, MODE_KIJUNSEN, 0);
b = iIchimoku(NULL, 0, 9, 26, 52, MODE_TENKANSEN, 0);
c = iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, 0);
d = iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANB, 0);
e = iIchimoku(NULL, 0, 9, 26, 52, MODE_CHINKOUSPAN, 26);

if (OrdersTotal()==0)
{
if (a>d&&b>d&&e>d)
{
OrderSend(Symbol(),OP_BUY,Lot,Ask,SP,Ask-SL*Point,Ask+TP*Point,0,MagicNumber,0,Blue);
}
if (a<d&&b<d&&e<d)
{
OrderSend(Symbol(),OP_SELL,Lot,Bid,SP,Bid+SL*Point,Bid-TP*Point,0,MagicNumber,0,Red);
}

}

//----
return(0);
}
//+------------------------------------------------------------------+

Reason: