FM-EVILMASHIN plus

FM-EVILMASHIN plus

官方版 无广告 65

更新日期:2022-11-08 分类标签: 语言:中文 平台:没限制

8 人已下载 手机查看

FM-EVILMASHIN plus FM-EVILMASHIN plus

 

//+------------------------------------------------------------------+
//| FM-EVILMASHIN.mq4 |
//| |
//| https://fxmoment.ru |
//+------------------------------------------------------------------+
#property copyright ""
#property link "https://fxmoment.ru"
//-----------------------相疣戾蝠?-----------------------------------+
extern string c0="袜耱痤殛?痂耜钼";
extern double Risk =0.5; //需耜 ?镳铞屙蝓
extern double ProfitProcent =3; //橡栳??镳铞屙蜞?
extern double StopProcent =0; //俞铌 ?镳铞屙蜞?
extern string c1="袜耱痤殛?皴蜿?;
extern bool UseSetka =true; //玛膻麇蝈朦 皴蜿?
extern double Step =1; //剜?皴蜿?
extern double UpLot =1; //羊屣屙?筲咫梓屙? 腩蜞
extern string c3="锣膻蝽 镟瘥";
extern string SYMBOL_1 ="EURGBP"; //锣膻蝽? 镟疣
extern string SYMBOL_2 ="EURNZD"; //锣膻蝽? 镟疣
extern string SYMBOL_3 ="EURAUD"; //锣膻蝽? 镟疣
extern string SYMBOL_4 ="EURCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_5 ="EURJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_6 ="EURCAD"; //锣膻蝽? 镟疣
extern string SYMBOL_7 ="GBPNZD"; //锣膻蝽? 镟疣
extern string SYMBOL_8 ="GBPAUD"; //锣膻蝽? 镟疣
extern string SYMBOL_9 ="GBPCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_10 ="GBPJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_11 ="GBPCAD"; //锣膻蝽? 镟疣
extern string SYMBOL_12 ="AUDNZD"; //锣膻蝽? 镟疣
extern string SYMBOL_13 ="NZDCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_14 ="NZDJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_15 ="NZDCAD"; //锣膻蝽? 镟疣
extern string SYMBOL_16 ="AUDCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_17 ="AUDJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_18 ="AUDCAD"; //锣膻蝽? 镟疣
extern string SYMBOL_19 ="CHFJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_20 ="CADCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_21 ="CADJPY"; //锣膻蝽? 镟疣
extern string SYMBOL_22 ="EURUSD"; //锣膻蝽? 镟疣
extern string SYMBOL_23 ="GBPUSD"; //锣膻蝽? 镟疣
extern string SYMBOL_24 ="NZDUSD"; //锣膻蝽? 镟疣
extern string SYMBOL_25 ="AUDUSD"; //锣膻蝽? 镟疣
extern string SYMBOL_26 ="USDCAD"; //锣膻蝽? 镟疣
extern string SYMBOL_27 ="USDCHF"; //锣膻蝽? 镟疣
extern string SYMBOL_28 ="USDJPY"; //锣膻蝽? 镟疣
extern string c4="袜耱痧铋觇 麴彘爨 ?爨痍屦?;
extern int TF =60; //责彘??觐蝾痤泐 徨疱?耔沩嚯
extern int FrameBar =60; //襄痂钿 怩钿钼
extern int Magic =7777; //锑痍屦 铕溴痤?
//--------------------------------------------------------------------+
string CommentEA ="FM-EVILMASHIN";
int D, op, send;
bool Buy1,Sell1,Buy2,Sell2,Buy3,Sell3,Buy4,Sell4,Buy5,Sell5,Buy6,Sell6,Buy7,Sell7,Buy8,Sell8,Buy9,Sell9,Buy10,Sell10,Buy11,Sell11,Buy12,Sell12,Buy13,Sell13,Buy14,Sell14,Buy15,Sell15,Buy16,Sell16,Buy17,Sell17,Buy18,Sell18,Buy19,Sell19,Buy20,Sell20,Buy21,Sell21,Buy22,Sell22,Buy23,Sell23,Buy24,Sell24,Buy25,Sell25,Buy26,Sell26,Buy27,Sell27,Buy28,Sell28;
int init()
{D=1;
if (Digits==5 || Digits==3)D=10;
return(0);}

int deinit() {
Comment("");
if (ObjectFind("BG") >= 0) ObjectDelete("BG");
if (ObjectFind("BG1") >= 0) ObjectDelete("BG1");
if (ObjectFind("BG2") >= 0) ObjectDelete("BG2");
if (ObjectFind("BG3") >= 0) ObjectDelete("BG3");
if (ObjectFind("BG4") >= 0) ObjectDelete("BG4");
if (ObjectFind("BG5") >= 0) ObjectDelete("BG5");
if (ObjectFind("NAME") >= 0) ObjectDelete("NAME");
return (0);
}
//--------------------------------------------------------------------+
int start(){
//--------------------------------------------------------------------+
double Lot=0;
Lot=NormalizeDouble(AccountBalance()/100*Risk/(MarketInfo(Symbol(),MODE_TICKVALUE)*100*D),2);
if (Lot<MarketInfo(Symbol(),MODE_MINLOT))Lot=MarketInfo(Symbol(),MODE_MINLOT);
//--------------------------------------------------------------------+
// 袜躅滂?耔沩嚯 镱 赅驿铋 镟疱 |
//--------------------------------------------------------------------+
Buy1=false;Sell1=false;
if (iLow(SYMBOL_1,TF,1)>MarketInfo(SYMBOL_1,MODE_ASK)){Buy1=true;}
if (iHigh(SYMBOL_1,TF,1)<MarketInfo(SYMBOL_1,MODE_BID)){Sell1=true;}
//----------//
Buy2=false;Sell2=false;
if (iLow(SYMBOL_2,TF,1)>MarketInfo(SYMBOL_2,MODE_ASK)){Buy2=true;}
if (iHigh(SYMBOL_2,TF,1)<MarketInfo(SYMBOL_2,MODE_BID)){Sell2=true;}
//----------//
Buy3=false;Sell3=false;
if (iLow(SYMBOL_3,TF,1)>MarketInfo(SYMBOL_3,MODE_ASK)){Buy3=true;}
if (iHigh(SYMBOL_3,TF,1)<MarketInfo(SYMBOL_3,MODE_BID)){Sell3=true;}
//----------//
Buy4=false;Sell4=false;
if (iLow(SYMBOL_4,TF,1)>MarketInfo(SYMBOL_4,MODE_ASK)){Buy4=true;}
if (iHigh(SYMBOL_4,TF,1)<MarketInfo(SYMBOL_4,MODE_BID)){Sell4=true;}
//----------//
Buy5=false;Sell5=false;
if (iLow(SYMBOL_5,TF,1)>MarketInfo(SYMBOL_5,MODE_ASK)){Buy5=true;}
if (iHigh(SYMBOL_5,TF,1)<MarketInfo(SYMBOL_5,MODE_BID)){Sell5=true;}
//----------//
Buy6=false;Sell6=false;
if (iLow(SYMBOL_6,TF,1)>MarketInfo(SYMBOL_6,MODE_ASK)){Buy6=true;}
if (iHigh(SYMBOL_6,TF,1)<MarketInfo(SYMBOL_6,MODE_BID)){Sell6=true;}
//----------//
Buy7=false;Sell7=false;
if (iLow(SYMBOL_7,TF,1)>MarketInfo(SYMBOL_7,MODE_ASK)){Buy7=true;}
if (iHigh(SYMBOL_7,TF,1)<MarketInfo(SYMBOL_7,MODE_BID)){Sell7=true;}
//----------//
Buy8=false;Sell8=false;
if (iLow(SYMBOL_8,TF,1)>MarketInfo(SYMBOL_8,MODE_ASK)){Buy8=true;}
if (iHigh(SYMBOL_8,TF,1)<MarketInfo(SYMBOL_8,MODE_BID)){Sell8=true;}
//----------//
Buy9=false;Sell9=false;
if (iLow(SYMBOL_9,TF,1)>MarketInfo(SYMBOL_9,MODE_ASK)){Buy9=true;}
if (iHigh(SYMBOL_9,TF,1)<MarketInfo(SYMBOL_9,MODE_BID)){Sell9=true;}
//----------//
Buy10=false;Sell10=false;
if (iLow(SYMBOL_10,TF,1)>MarketInfo(SYMBOL_10,MODE_ASK)){Buy10=true;}
if (iHigh(SYMBOL_10,TF,1)<MarketInfo(SYMBOL_10,MODE_BID)){Sell10=true;}
//----------//
Buy11=false;Sell11=false;
if (iLow(SYMBOL_11,TF,1)>MarketInfo(SYMBOL_11,MODE_ASK)){Buy11=true;}
if (iHigh(SYMBOL_11,TF,1)<MarketInfo(SYMBOL_11,MODE_BID)){Sell11=true;}
//----------//
Buy12=false;Sell12=false;
if (iLow(SYMBOL_12,TF,1)>MarketInfo(SYMBOL_12,MODE_ASK)){Buy12=true;}
if (iHigh(SYMBOL_12,TF,1)<MarketInfo(SYMBOL_12,MODE_BID)){Sell12=true;}
//----------//
Buy13=false;Sell13=false;
if (iLow(SYMBOL_13,TF,1)>MarketInfo(SYMBOL_13,MODE_ASK)){Buy13=true;}
if (iHigh(SYMBOL_13,TF,1)<MarketInfo(SYMBOL_13,MODE_BID)){Sell13=true;}
//----------//
Buy14=false;Sell14=false;
if (iLow(SYMBOL_14,TF,1)>MarketInfo(SYMBOL_14,MODE_ASK)){Buy14=true;}
if (iHigh(SYMBOL_14,TF,1)<MarketInfo(SYMBOL_14,MODE_BID)){Sell14=true;}
//----------//
Buy15=false;Sell15=false;
if (iLow(SYMBOL_15,TF,1)>MarketInfo(SYMBOL_15,MODE_ASK)){Buy15=true;}
if (iHigh(SYMBOL_15,TF,1)<MarketInfo(SYMBOL_15,MODE_BID)){Sell15=true;}
//----------//
Buy16=false;Sell16=false;
if (iLow(SYMBOL_16,TF,1)>MarketInfo(SYMBOL_16,MODE_ASK)){Buy16=true;}
if (iHigh(SYMBOL_16,TF,1)<MarketInfo(SYMBOL_16,MODE_BID)){Sell16=true;}
//----------//
Buy17=false;Sell17=false;
if (iLow(SYMBOL_17,TF,1)>MarketInfo(SYMBOL_17,MODE_ASK)){Buy17=true;}
if (iHigh(SYMBOL_17,TF,1)<MarketInfo(SYMBOL_17,MODE_BID)){Sell17=true;}
//----------//
Buy18=false;Sell18=false;
if (iLow(SYMBOL_18,TF,1)>MarketInfo(SYMBOL_18,MODE_ASK)){Buy18=true;}
if (iHigh(SYMBOL_18,TF,1)<MarketInfo(SYMBOL_18,MODE_BID)){Sell18=true;}
//----------//
Buy19=false;Sell19=false;
if (iLow(SYMBOL_19,TF,1)>MarketInfo(SYMBOL_19,MODE_ASK)){Buy19=true;}
if (iHigh(SYMBOL_19,TF,1)<MarketInfo(SYMBOL_19,MODE_BID)){Sell19=true;}
//----------//
Buy20=false;Sell20=false;
if (iLow(SYMBOL_20,TF,1)>MarketInfo(SYMBOL_20,MODE_ASK)){Buy20=true;}
if (iHigh(SYMBOL_20,TF,1)<MarketInfo(SYMBOL_20,MODE_BID)){Sell20=true;}
//----------//
Buy21=false;Sell21=false;
if (iLow(SYMBOL_21,TF,1)>MarketInfo(SYMBOL_21,MODE_ASK)){Buy21=true;}
if (iHigh(SYMBOL_21,TF,1)<MarketInfo(SYMBOL_21,MODE_BID)){Sell21=true;}
//----------//
Buy22=false;Sell22=false;
if (iLow(SYMBOL_22,TF,1)>MarketInfo(SYMBOL_22,MODE_ASK)){Buy22=true;}
if (iHigh(SYMBOL_22,TF,1)<MarketInfo(SYMBOL_22,MODE_BID)){Sell22=true;}
//----------//
Buy23=false;Sell23=false;
if (iLow(SYMBOL_23,TF,1)>MarketInfo(SYMBOL_23,MODE_ASK)){Buy23=true;}
if (iHigh(SYMBOL_23,TF,1)<MarketInfo(SYMBOL_23,MODE_BID)){Sell23=true;}
//----------//
Buy24=false;Sell24=false;
if (iLow(SYMBOL_24,TF,1)>MarketInfo(SYMBOL_24,MODE_ASK)){Buy24=true;}
if (iHigh(SYMBOL_24,TF,1)<MarketInfo(SYMBOL_24,MODE_BID)){Sell24=true;}
//----------//
Buy25=false;Sell25=false;
if (iLow(SYMBOL_25,TF,1)>MarketInfo(SYMBOL_25,MODE_ASK)){Buy25=true;}
if (iHigh(SYMBOL_25,TF,1)<MarketInfo(SYMBOL_25,MODE_BID)){Sell25=true;}
//----------//
Buy26=false;Sell26=false;
if (iLow(SYMBOL_26,TF,1)>MarketInfo(SYMBOL_26,MODE_ASK)){Buy26=true;}
if (iHigh(SYMBOL_26,TF,1)<MarketInfo(SYMBOL_26,MODE_BID)){Sell26=true;}
//----------//
Buy27=false;Sell27=false;
if (iLow(SYMBOL_27,TF,1)>MarketInfo(SYMBOL_27,MODE_ASK)){Buy27=true;}
if (iHigh(SYMBOL_27,TF,1)<MarketInfo(SYMBOL_27,MODE_BID)){Sell27=true;}
//----------//
Buy28=false;Sell28=false;
if (iLow(SYMBOL_28,TF,1)>MarketInfo(SYMBOL_28,MODE_ASK)){Buy28=true;}
if (iHigh(SYMBOL_28,TF,1)<MarketInfo(SYMBOL_28,MODE_BID)){Sell28=true;}
//--------------------------------------------------------------------+
// 蔓麒耠屐 筲咫梓屙桢 腩蜞 潆 赅驿铋 镟瘥 |
//--------------------------------------------------------------------+
double NLot1=Lot*(MathPow(UpLot,Count(-1,SYMBOL_1)));

double NLot2=Lot*(MathPow(UpLot,Count(-1,SYMBOL_2)));

double NLot3=Lot*(MathPow(UpLot,Count(-1,SYMBOL_3)));

double NLot4=Lot*(MathPow(UpLot,Count(-1,SYMBOL_4)));

double NLot5=Lot*(MathPow(UpLot,Count(-1,SYMBOL_5)));

double NLot6=Lot*(MathPow(UpLot,Count(-1,SYMBOL_6)));

double NLot7=Lot*(MathPow(UpLot,Count(-1,SYMBOL_7)));

double NLot8=Lot*(MathPow(UpLot,Count(-1,SYMBOL_8)));

double NLot9=Lot*(MathPow(UpLot,Count(-1,SYMBOL_9)));

double NLot10=Lot*(MathPow(UpLot,Count(-1,SYMBOL_10)));

double NLot11=Lot*(MathPow(UpLot,Count(-1,SYMBOL_11)));

double NLot12=Lot*(MathPow(UpLot,Count(-1,SYMBOL_12)));

double NLot13=Lot*(MathPow(UpLot,Count(-1,SYMBOL_13)));

double NLot14=Lot*(MathPow(UpLot,Count(-1,SYMBOL_14)));

double NLot15=Lot*(MathPow(UpLot,Count(-1,SYMBOL_15)));

double NLot16=Lot*(MathPow(UpLot,Count(-1,SYMBOL_16)));

double NLot17=Lot*(MathPow(UpLot,Count(-1,SYMBOL_17)));

double NLot18=Lot*(MathPow(UpLot,Count(-1,SYMBOL_18)));

double NLot19=Lot*(MathPow(UpLot,Count(-1,SYMBOL_19)));

double NLot20=Lot*(MathPow(UpLot,Count(-1,SYMBOL_20)));

double NLot21=Lot*(MathPow(UpLot,Count(-1,SYMBOL_21)));

double NLot22=Lot*(MathPow(UpLot,Count(-1,SYMBOL_22)));

double NLot23=Lot*(MathPow(UpLot,Count(-1,SYMBOL_23)));

double NLot24=Lot*(MathPow(UpLot,Count(-1,SYMBOL_24)));

double NLot25=Lot*(MathPow(UpLot,Count(-1,SYMBOL_25)));

double NLot26=Lot*(MathPow(UpLot,Count(-1,SYMBOL_26)));

double NLot27=Lot*(MathPow(UpLot,Count(-1,SYMBOL_27)));

double NLot28=Lot*(MathPow(UpLot,Count(-1,SYMBOL_28)));
//--------------------------------------------------------------------+
// 悟牮噱?铕溴疣 镱 赅驿铋 镟疱 镳?磬腓麒?耔沩嚯? |
//--------------------------------------------------------------------+
if (Count2(-1,SYMBOL_1)==0 && Count(-1,SYMBOL_1)==0 && Buy1)
{op=OrderSend(SYMBOL_1,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_1,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_1)==0 && Count(-1,SYMBOL_1)==0 && Sell1)
{op=OrderSend(SYMBOL_1,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_1,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_2)==0 && Count(-1,SYMBOL_2)==0 && Buy2)
{op=OrderSend(SYMBOL_2,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_2,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_2)==0 && Count(-1,SYMBOL_2)==0 && Sell2)
{op=OrderSend(SYMBOL_2,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_2,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_3)==0 && Count(-1,SYMBOL_3)==0 && Buy3)
{op=OrderSend(SYMBOL_3,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_3,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_3)==0 && Count(-1,SYMBOL_3)==0 && Sell3)
{op=OrderSend(SYMBOL_3,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_3,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_4)==0 && Count(-1,SYMBOL_4)==0 && Buy4)
{op=OrderSend(SYMBOL_4,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_4,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_4)==0 && Count(-1,SYMBOL_4)==0 && Sell4)
{op=OrderSend(SYMBOL_4,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_4,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_5)==0 && Count(-1,SYMBOL_5)==0 && Buy5)
{op=OrderSend(SYMBOL_5,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_5,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_5)==0 && Count(-1,SYMBOL_5)==0 && Sell5)
{op=OrderSend(SYMBOL_5,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_5,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_6)==0 && Count(-1,SYMBOL_6)==0 && Buy6)
{op=OrderSend(SYMBOL_6,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_6,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_6)==0 && Count(-1,SYMBOL_6)==0 && Sell6)
{op=OrderSend(SYMBOL_6,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_6,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_7)==0 && Count(-1,SYMBOL_7)==0 && Buy7)
{op=OrderSend(SYMBOL_7,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_7,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_7)==0 && Count(-1,SYMBOL_7)==0 && Sell7)
{op=OrderSend(SYMBOL_7,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_7,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_8)==0 && Count(-1,SYMBOL_8)==0 && Buy8)
{op=OrderSend(SYMBOL_8,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_8,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_8)==0 && Count(-1,SYMBOL_8)==0 && Sell8)
{op=OrderSend(SYMBOL_8,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_8,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_9)==0 && Count(-1,SYMBOL_9)==0 && Buy9)
{op=OrderSend(SYMBOL_9,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_9,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_9)==0 && Count(-1,SYMBOL_9)==0 && Sell9)
{op=OrderSend(SYMBOL_9,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_9,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_10)==0 && Count(-1,SYMBOL_10)==0 && Buy10)
{op=OrderSend(SYMBOL_10,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_10,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_10)==0 && Count(-1,SYMBOL_10)==0 && Sell10)
{op=OrderSend(SYMBOL_10,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_10,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_11)==0 && Count(-1,SYMBOL_11)==0 && Buy11)
{op=OrderSend(SYMBOL_11,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_11,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_11)==0 && Count(-1,SYMBOL_11)==0 && Sell11)
{op=OrderSend(SYMBOL_11,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_11,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_12)==0 && Count(-1,SYMBOL_12)==0 && Buy12)
{op=OrderSend(SYMBOL_12,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_12,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_12)==0 && Count(-1,SYMBOL_12)==0 && Sell12)
{op=OrderSend(SYMBOL_12,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_12,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_13)==0 && Count(-1,SYMBOL_13)==0 && Buy13)
{op=OrderSend(SYMBOL_13,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_13,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_13)==0 && Count(-1,SYMBOL_13)==0 && Sell13)
{op=OrderSend(SYMBOL_13,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_13,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_14)==0 && Count(-1,SYMBOL_14)==0 && Buy14)
{op=OrderSend(SYMBOL_14,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_14,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_14)==0 && Count(-1,SYMBOL_14)==0 && Sell14)
{op=OrderSend(SYMBOL_14,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_14,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_15)==0 && Count(-1,SYMBOL_15)==0 && Buy15)
{op=OrderSend(SYMBOL_15,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_15,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_15)==0 && Count(-1,SYMBOL_15)==0 && Sell15)
{op=OrderSend(SYMBOL_15,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_15,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_16)==0 && Count(-1,SYMBOL_16)==0 && Buy16)
{op=OrderSend(SYMBOL_16,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_16,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_16)==0 && Count(-1,SYMBOL_16)==0 && Sell16)
{op=OrderSend(SYMBOL_16,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_16,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_17)==0 && Count(-1,SYMBOL_17)==0 && Buy17)
{op=OrderSend(SYMBOL_17,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_17,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_17)==0 && Count(-1,SYMBOL_17)==0 && Sell17)
{op=OrderSend(SYMBOL_17,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_17,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_18)==0 && Count(-1,SYMBOL_18)==0 && Buy18)
{op=OrderSend(SYMBOL_18,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_18,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_18)==0 && Count(-1,SYMBOL_18)==0 && Sell18)
{op=OrderSend(SYMBOL_18,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_18,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_19)==0 && Count(-1,SYMBOL_19)==0 && Buy19)
{op=OrderSend(SYMBOL_19,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_19,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_19)==0 && Count(-1,SYMBOL_19)==0 && Sell19)
{op=OrderSend(SYMBOL_19,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_19,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_20)==0 && Count(-1,SYMBOL_20)==0 && Buy20)
{op=OrderSend(SYMBOL_20,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_20,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_20)==0 && Count(-1,SYMBOL_20)==0 && Sell20)
{op=OrderSend(SYMBOL_20,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_20,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_21)==0 && Count(-1,SYMBOL_21)==0 && Buy21)
{op=OrderSend(SYMBOL_21,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_21,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_21)==0 && Count(-1,SYMBOL_21)==0 && Sell21)
{op=OrderSend(SYMBOL_21,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_21,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_22)==0 && Count(-1,SYMBOL_22)==0 && Buy22)
{op=OrderSend(SYMBOL_22,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_22,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_22)==0 && Count(-1,SYMBOL_22)==0 && Sell22)
{op=OrderSend(SYMBOL_22,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_22,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_23)==0 && Count(-1,SYMBOL_23)==0 && Buy23)
{op=OrderSend(SYMBOL_23,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_23,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_23)==0 && Count(-1,SYMBOL_23)==0 && Sell23)
{op=OrderSend(SYMBOL_23,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_23,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_24)==0 && Count(-1,SYMBOL_24)==0 && Buy24)
{op=OrderSend(SYMBOL_24,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_24,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_24)==0 && Count(-1,SYMBOL_24)==0 && Sell24)
{op=OrderSend(SYMBOL_24,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_24,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_25)==0 && Count(-1,SYMBOL_25)==0 && Buy25)
{op=OrderSend(SYMBOL_25,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_25,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_25)==0 && Count(-1,SYMBOL_25)==0 && Sell25)
{op=OrderSend(SYMBOL_25,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_25,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_26)==0 && Count(-1,SYMBOL_26)==0 && Buy26)
{op=OrderSend(SYMBOL_26,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_26,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_26)==0 && Count(-1,SYMBOL_26)==0 && Sell26)
{op=OrderSend(SYMBOL_26,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_26,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_27)==0 && Count(-1,SYMBOL_27)==0 && Buy27)
{op=OrderSend(SYMBOL_27,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_27,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_27)==0 && Count(-1,SYMBOL_27)==0 && Sell27)
{op=OrderSend(SYMBOL_27,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_27,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if (Count2(-1,SYMBOL_28)==0 && Count(-1,SYMBOL_28)==0 && Buy28)
{op=OrderSend(SYMBOL_28,OP_BUY,Lot,NormalizeDouble(MarketInfo(SYMBOL_28,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if (Count2(-1,SYMBOL_28)==0 && Count(-1,SYMBOL_28)==0 && Sell28)
{op=OrderSend(SYMBOL_28,OP_SELL,Lot,NormalizeDouble(MarketInfo(SYMBOL_28,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//--------------------------------------------------------------------+
// 锐镱朦珞屐 皴蜿?羼腓 铐?怅膻麇磬 |
//--------------------------------------------------------------------+
if(UseSetka){

if(Count(OP_BUY,SYMBOL_1)>0 && NormalizeDouble((MarketInfo(SYMBOL_1,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_1,MODE_POINT))), Digits)>=OldPricB(SYMBOL_1))
{send=OrderSend(SYMBOL_1,OP_BUY,NLot1,NormalizeDouble(MarketInfo(SYMBOL_1,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_1)>0 && NormalizeDouble((MarketInfo(SYMBOL_1,MODE_BID)+Step*D*(MarketInfo(SYMBOL_1,MODE_POINT))), Digits)<=OldPricS(SYMBOL_1))
{send=OrderSend(SYMBOL_1,OP_SELL,NLot1,NormalizeDouble(MarketInfo(SYMBOL_1,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_2)>0 && NormalizeDouble((MarketInfo(SYMBOL_2,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_2,MODE_POINT))), Digits)>=OldPricB(SYMBOL_2))
{send=OrderSend(SYMBOL_2,OP_BUY,NLot2,NormalizeDouble(MarketInfo(SYMBOL_2,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_2)>0 && NormalizeDouble((MarketInfo(SYMBOL_2,MODE_BID)+Step*D*(MarketInfo(SYMBOL_2,MODE_POINT))), Digits)<=OldPricS(SYMBOL_2))
{send=OrderSend(SYMBOL_2,OP_SELL,NLot2,NormalizeDouble(MarketInfo(SYMBOL_2,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_3)>0 && NormalizeDouble((MarketInfo(SYMBOL_3,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_3,MODE_POINT))), Digits)>=OldPricB(SYMBOL_3))
{send=OrderSend(SYMBOL_3,OP_BUY,NLot3,NormalizeDouble(MarketInfo(SYMBOL_3,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_3)>0 && NormalizeDouble((MarketInfo(SYMBOL_3,MODE_BID)+Step*D*(MarketInfo(SYMBOL_3,MODE_POINT))), Digits)<=OldPricS(SYMBOL_3))
{send=OrderSend(SYMBOL_3,OP_SELL,NLot3,NormalizeDouble(MarketInfo(SYMBOL_3,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_4)>0 && NormalizeDouble((MarketInfo(SYMBOL_4,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_4,MODE_POINT))), Digits)>=OldPricB(SYMBOL_4))
{send=OrderSend(SYMBOL_4,OP_BUY,NLot4,NormalizeDouble(MarketInfo(SYMBOL_4,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_4)>0 && NormalizeDouble((MarketInfo(SYMBOL_4,MODE_BID)+Step*D*(MarketInfo(SYMBOL_4,MODE_POINT))), Digits)<=OldPricS(SYMBOL_4))
{send=OrderSend(SYMBOL_4,OP_SELL,NLot4,NormalizeDouble(MarketInfo(SYMBOL_4,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_5)>0 && NormalizeDouble((MarketInfo(SYMBOL_5,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_5,MODE_POINT))), Digits)>=OldPricB(SYMBOL_5))
{send=OrderSend(SYMBOL_5,OP_BUY,NLot5,NormalizeDouble(MarketInfo(SYMBOL_5,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_5)>0 && NormalizeDouble((MarketInfo(SYMBOL_5,MODE_BID)+Step*D*(MarketInfo(SYMBOL_5,MODE_POINT))), Digits)<=OldPricS(SYMBOL_5))
{send=OrderSend(SYMBOL_5,OP_SELL,NLot5,NormalizeDouble(MarketInfo(SYMBOL_5,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_6)>0 && NormalizeDouble((MarketInfo(SYMBOL_6,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_6,MODE_POINT))), Digits)>=OldPricB(SYMBOL_6))
{send=OrderSend(SYMBOL_6,OP_BUY,NLot6,NormalizeDouble(MarketInfo(SYMBOL_6,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_6)>0 && NormalizeDouble((MarketInfo(SYMBOL_6,MODE_BID)+Step*D*(MarketInfo(SYMBOL_6,MODE_POINT))), Digits)<=OldPricS(SYMBOL_6))
{send=OrderSend(SYMBOL_6,OP_SELL,NLot6,NormalizeDouble(MarketInfo(SYMBOL_6,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_7)>0 && NormalizeDouble((MarketInfo(SYMBOL_7,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_7,MODE_POINT))), Digits)>=OldPricB(SYMBOL_7))
{send=OrderSend(SYMBOL_7,OP_BUY,NLot7,NormalizeDouble(MarketInfo(SYMBOL_7,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_7)>0 && NormalizeDouble((MarketInfo(SYMBOL_7,MODE_BID)+Step*D*(MarketInfo(SYMBOL_7,MODE_POINT))), Digits)<=OldPricS(SYMBOL_7))
{send=OrderSend(SYMBOL_7,OP_SELL,NLot7,NormalizeDouble(MarketInfo(SYMBOL_7,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_8)>0 && NormalizeDouble((MarketInfo(SYMBOL_8,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_8,MODE_POINT))), Digits)>=OldPricB(SYMBOL_8))
{send=OrderSend(SYMBOL_8,OP_BUY,NLot8,NormalizeDouble(MarketInfo(SYMBOL_8,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_8)>0 && NormalizeDouble((MarketInfo(SYMBOL_8,MODE_BID)+Step*D*(MarketInfo(SYMBOL_8,MODE_POINT))), Digits)<=OldPricS(SYMBOL_8))
{send=OrderSend(SYMBOL_8,OP_SELL,NLot8,NormalizeDouble(MarketInfo(SYMBOL_8,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_9)>0 && NormalizeDouble((MarketInfo(SYMBOL_9,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_9,MODE_POINT))), Digits)>=OldPricB(SYMBOL_9))
{send=OrderSend(SYMBOL_9,OP_BUY,NLot9,NormalizeDouble(MarketInfo(SYMBOL_9,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_9)>0 && NormalizeDouble((MarketInfo(SYMBOL_9,MODE_BID)+Step*D*(MarketInfo(SYMBOL_9,MODE_POINT))), Digits)<=OldPricS(SYMBOL_9))
{send=OrderSend(SYMBOL_9,OP_SELL,NLot9,NormalizeDouble(MarketInfo(SYMBOL_9,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_10)>0 && NormalizeDouble((MarketInfo(SYMBOL_10,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_10,MODE_POINT))), Digits)>=OldPricB(SYMBOL_10))
{send=OrderSend(SYMBOL_10,OP_BUY,NLot10,NormalizeDouble(MarketInfo(SYMBOL_10,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_10)>0 && NormalizeDouble((MarketInfo(SYMBOL_10,MODE_BID)+Step*D*(MarketInfo(SYMBOL_10,MODE_POINT))), Digits)<=OldPricS(SYMBOL_10))
{send=OrderSend(SYMBOL_10,OP_SELL,NLot10,NormalizeDouble(MarketInfo(SYMBOL_10,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_11)>0 && NormalizeDouble((MarketInfo(SYMBOL_11,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_11,MODE_POINT))), Digits)>=OldPricB(SYMBOL_11))
{send=OrderSend(SYMBOL_11,OP_BUY,NLot11,NormalizeDouble(MarketInfo(SYMBOL_11,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_11)>0 && NormalizeDouble((MarketInfo(SYMBOL_11,MODE_BID)+Step*D*(MarketInfo(SYMBOL_11,MODE_POINT))), Digits)<=OldPricS(SYMBOL_11))
{send=OrderSend(SYMBOL_11,OP_SELL,NLot11,NormalizeDouble(MarketInfo(SYMBOL_11,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_12)>0 && NormalizeDouble((MarketInfo(SYMBOL_12,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_12,MODE_POINT))), Digits)>=OldPricB(SYMBOL_12))
{send=OrderSend(SYMBOL_12,OP_BUY,NLot12,NormalizeDouble(MarketInfo(SYMBOL_12,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_12)>0 && NormalizeDouble((MarketInfo(SYMBOL_12,MODE_BID)+Step*D*(MarketInfo(SYMBOL_12,MODE_POINT))), Digits)<=OldPricS(SYMBOL_12))
{send=OrderSend(SYMBOL_12,OP_SELL,NLot12,NormalizeDouble(MarketInfo(SYMBOL_12,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_13)>0 && NormalizeDouble((MarketInfo(SYMBOL_13,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_13,MODE_POINT))), Digits)>=OldPricB(SYMBOL_13))
{send=OrderSend(SYMBOL_13,OP_BUY,NLot13,NormalizeDouble(MarketInfo(SYMBOL_13,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_13)>0 && NormalizeDouble((MarketInfo(SYMBOL_13,MODE_BID)+Step*D*(MarketInfo(SYMBOL_13,MODE_POINT))), Digits)<=OldPricS(SYMBOL_13))
{send=OrderSend(SYMBOL_13,OP_SELL,NLot13,NormalizeDouble(MarketInfo(SYMBOL_13,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_14)>0 && NormalizeDouble((MarketInfo(SYMBOL_14,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_14,MODE_POINT))), Digits)>=OldPricB(SYMBOL_14))
{send=OrderSend(SYMBOL_14,OP_BUY,NLot13,NormalizeDouble(MarketInfo(SYMBOL_14,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_14)>0 && NormalizeDouble((MarketInfo(SYMBOL_14,MODE_BID)+Step*D*(MarketInfo(SYMBOL_14,MODE_POINT))), Digits)<=OldPricS(SYMBOL_14))
{send=OrderSend(SYMBOL_14,OP_SELL,NLot13,NormalizeDouble(MarketInfo(SYMBOL_14,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_15)>0 && NormalizeDouble((MarketInfo(SYMBOL_15,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_15,MODE_POINT))), Digits)>=OldPricB(SYMBOL_15))
{send=OrderSend(SYMBOL_15,OP_BUY,NLot14,NormalizeDouble(MarketInfo(SYMBOL_15,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_15)>0 && NormalizeDouble((MarketInfo(SYMBOL_15,MODE_BID)+Step*D*(MarketInfo(SYMBOL_15,MODE_POINT))), Digits)<=OldPricS(SYMBOL_15))
{send=OrderSend(SYMBOL_15,OP_SELL,NLot14,NormalizeDouble(MarketInfo(SYMBOL_15,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_16)>0 && NormalizeDouble((MarketInfo(SYMBOL_16,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_16,MODE_POINT))), Digits)>=OldPricB(SYMBOL_16))
{send=OrderSend(SYMBOL_16,OP_BUY,NLot15,NormalizeDouble(MarketInfo(SYMBOL_16,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_16)>0 && NormalizeDouble((MarketInfo(SYMBOL_16,MODE_BID)+Step*D*(MarketInfo(SYMBOL_16,MODE_POINT))), Digits)<=OldPricS(SYMBOL_16))
{send=OrderSend(SYMBOL_16,OP_SELL,NLot15,NormalizeDouble(MarketInfo(SYMBOL_16,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_17)>0 && NormalizeDouble((MarketInfo(SYMBOL_17,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_17,MODE_POINT))), Digits)>=OldPricB(SYMBOL_17))
{send=OrderSend(SYMBOL_17,OP_BUY,NLot16,NormalizeDouble(MarketInfo(SYMBOL_17,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_17)>0 && NormalizeDouble((MarketInfo(SYMBOL_17,MODE_BID)+Step*D*(MarketInfo(SYMBOL_17,MODE_POINT))), Digits)<=OldPricS(SYMBOL_17))
{send=OrderSend(SYMBOL_17,OP_SELL,NLot16,NormalizeDouble(MarketInfo(SYMBOL_17,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_18)>0 && NormalizeDouble((MarketInfo(SYMBOL_18,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_18,MODE_POINT))), Digits)>=OldPricB(SYMBOL_18))
{send=OrderSend(SYMBOL_18,OP_BUY,NLot17,NormalizeDouble(MarketInfo(SYMBOL_18,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_18)>0 && NormalizeDouble((MarketInfo(SYMBOL_18,MODE_BID)+Step*D*(MarketInfo(SYMBOL_18,MODE_POINT))), Digits)<=OldPricS(SYMBOL_18))
{send=OrderSend(SYMBOL_18,OP_SELL,NLot17,NormalizeDouble(MarketInfo(SYMBOL_18,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_19)>0 && NormalizeDouble((MarketInfo(SYMBOL_19,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_19,MODE_POINT))), Digits)>=OldPricB(SYMBOL_19))
{send=OrderSend(SYMBOL_19,OP_BUY,NLot18,NormalizeDouble(MarketInfo(SYMBOL_19,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_19)>0 && NormalizeDouble((MarketInfo(SYMBOL_19,MODE_BID)+Step*D*(MarketInfo(SYMBOL_19,MODE_POINT))), Digits)<=OldPricS(SYMBOL_19))
{send=OrderSend(SYMBOL_19,OP_SELL,NLot19,NormalizeDouble(MarketInfo(SYMBOL_19,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_20)>0 && NormalizeDouble((MarketInfo(SYMBOL_20,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_20,MODE_POINT))), Digits)>=OldPricB(SYMBOL_20))
{send=OrderSend(SYMBOL_20,OP_BUY,NLot20,NormalizeDouble(MarketInfo(SYMBOL_20,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_20)>0 && NormalizeDouble((MarketInfo(SYMBOL_20,MODE_BID)+Step*D*(MarketInfo(SYMBOL_20,MODE_POINT))), Digits)<=OldPricS(SYMBOL_20))
{send=OrderSend(SYMBOL_20,OP_SELL,NLot20,NormalizeDouble(MarketInfo(SYMBOL_20,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_21)>0 && NormalizeDouble((MarketInfo(SYMBOL_21,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_21,MODE_POINT))), Digits)>=OldPricB(SYMBOL_21))
{send=OrderSend(SYMBOL_21,OP_BUY,NLot21,NormalizeDouble(MarketInfo(SYMBOL_21,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_21)>0 && NormalizeDouble((MarketInfo(SYMBOL_21,MODE_BID)+Step*D*(MarketInfo(SYMBOL_21,MODE_POINT))), Digits)<=OldPricS(SYMBOL_21))
{send=OrderSend(SYMBOL_21,OP_SELL,NLot21,NormalizeDouble(MarketInfo(SYMBOL_21,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_22)>0 && NormalizeDouble((MarketInfo(SYMBOL_22,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_22,MODE_POINT))), Digits)>=OldPricB(SYMBOL_22))
{send=OrderSend(SYMBOL_22,OP_BUY,NLot22,NormalizeDouble(MarketInfo(SYMBOL_22,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_22)>0 && NormalizeDouble((MarketInfo(SYMBOL_22,MODE_BID)+Step*D*(MarketInfo(SYMBOL_22,MODE_POINT))), Digits)<=OldPricS(SYMBOL_22))
{send=OrderSend(SYMBOL_22,OP_SELL,NLot22,NormalizeDouble(MarketInfo(SYMBOL_22,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_23)>0 && NormalizeDouble((MarketInfo(SYMBOL_23,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_23,MODE_POINT))), Digits)>=OldPricB(SYMBOL_23))
{send=OrderSend(SYMBOL_23,OP_BUY,NLot23,NormalizeDouble(MarketInfo(SYMBOL_23,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_23)>0 && NormalizeDouble((MarketInfo(SYMBOL_23,MODE_BID)+Step*D*(MarketInfo(SYMBOL_23,MODE_POINT))), Digits)<=OldPricS(SYMBOL_23))
{send=OrderSend(SYMBOL_23,OP_SELL,NLot23,NormalizeDouble(MarketInfo(SYMBOL_23,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_24)>0 && NormalizeDouble((MarketInfo(SYMBOL_24,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_24,MODE_POINT))), Digits)>=OldPricB(SYMBOL_24))
{send=OrderSend(SYMBOL_24,OP_BUY,NLot24,NormalizeDouble(MarketInfo(SYMBOL_24,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_24)>0 && NormalizeDouble((MarketInfo(SYMBOL_24,MODE_BID)+Step*D*(MarketInfo(SYMBOL_24,MODE_POINT))), Digits)<=OldPricS(SYMBOL_24))
{send=OrderSend(SYMBOL_24,OP_SELL,NLot24,NormalizeDouble(MarketInfo(SYMBOL_24,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_25)>0 && NormalizeDouble((MarketInfo(SYMBOL_25,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_25,MODE_POINT))), Digits)>=OldPricB(SYMBOL_25))
{send=OrderSend(SYMBOL_25,OP_BUY,NLot25,NormalizeDouble(MarketInfo(SYMBOL_25,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_25)>0 && NormalizeDouble((MarketInfo(SYMBOL_25,MODE_BID)+Step*D*(MarketInfo(SYMBOL_25,MODE_POINT))), Digits)<=OldPricS(SYMBOL_25))
{send=OrderSend(SYMBOL_25,OP_SELL,NLot25,NormalizeDouble(MarketInfo(SYMBOL_25,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_26)>0 && NormalizeDouble((MarketInfo(SYMBOL_26,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_26,MODE_POINT))), Digits)>=OldPricB(SYMBOL_26))
{send=OrderSend(SYMBOL_26,OP_BUY,NLot26,NormalizeDouble(MarketInfo(SYMBOL_26,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_26)>0 && NormalizeDouble((MarketInfo(SYMBOL_26,MODE_BID)+Step*D*(MarketInfo(SYMBOL_26,MODE_POINT))), Digits)<=OldPricS(SYMBOL_26))
{send=OrderSend(SYMBOL_26,OP_SELL,NLot26,NormalizeDouble(MarketInfo(SYMBOL_26,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_27)>0 && NormalizeDouble((MarketInfo(SYMBOL_27,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_27,MODE_POINT))), Digits)>=OldPricB(SYMBOL_27))
{send=OrderSend(SYMBOL_27,OP_BUY,NLot27,NormalizeDouble(MarketInfo(SYMBOL_27,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_27)>0 && NormalizeDouble((MarketInfo(SYMBOL_27,MODE_BID)+Step*D*(MarketInfo(SYMBOL_27,MODE_POINT))), Digits)<=OldPricS(SYMBOL_27))
{send=OrderSend(SYMBOL_27,OP_SELL,NLot27,NormalizeDouble(MarketInfo(SYMBOL_27,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
//----------//
if(Count(OP_BUY,SYMBOL_28)>0 && NormalizeDouble((MarketInfo(SYMBOL_28,MODE_ASK)-Step*D*(MarketInfo(SYMBOL_28,MODE_POINT))), Digits)>=OldPricB(SYMBOL_28))
{send=OrderSend(SYMBOL_28,OP_BUY,NLot28,NormalizeDouble(MarketInfo(SYMBOL_28,MODE_ASK), Digits),100,0,0,CommentEA,Magic,0,Green);}
if(Count(OP_SELL,SYMBOL_28)>0 && NormalizeDouble((MarketInfo(SYMBOL_28,MODE_BID)+Step*D*(MarketInfo(SYMBOL_28,MODE_POINT))), Digits)<=OldPricS(SYMBOL_28))
{send=OrderSend(SYMBOL_28,OP_SELL,NLot28,NormalizeDouble(MarketInfo(SYMBOL_28,MODE_BID), Digits),100,0,0,CommentEA,Magic,0,Red);}
}
//--------------------------------------------------------------------+
// 青牮噱?铕溴疣 镳?漕耱桄屙梃 镳铘栩?桦?耱铒? |
//--------------------------------------------------------------------+
double P1=ProfitP(-1, SYMBOL_1)+ProfitP(-1, SYMBOL_2)+ProfitP(-1, SYMBOL_3)+ProfitP(-1, SYMBOL_4)+ProfitP(-1, SYMBOL_5)+ProfitP(-1, SYMBOL_6)+ProfitP(-1, SYMBOL_22);
double P2=ProfitP(-1, SYMBOL_7)+ProfitP(-1, SYMBOL_8)+ProfitP(-1, SYMBOL_9)+ProfitP(-1, SYMBOL_10)+ProfitP(-1, SYMBOL_11)+ProfitP(-1, SYMBOL_1)+ProfitP(-1, SYMBOL_23);
double P3=ProfitP(-1, SYMBOL_16)+ProfitP(-1, SYMBOL_17)+ProfitP(-1, SYMBOL_18)+ProfitP(-1, SYMBOL_3)+ProfitP(-1, SYMBOL_12)+ProfitP(-1, SYMBOL_8)+ProfitP(-1, SYMBOL_25);
double P4=ProfitP(-1, SYMBOL_12)+ProfitP(-1, SYMBOL_13)+ProfitP(-1, SYMBOL_14)+ProfitP(-1, SYMBOL_15)+ProfitP(-1, SYMBOL_7)+ProfitP(-1, SYMBOL_2)+ProfitP(-1, SYMBOL_24);
double P5=ProfitP(-1, SYMBOL_4)+ProfitP(-1, SYMBOL_9)+ProfitP(-1, SYMBOL_13)+ProfitP(-1, SYMBOL_16)+ProfitP(-1, SYMBOL_19)+ProfitP(-1, SYMBOL_20)+ProfitP(-1, SYMBOL_27);
double P6=ProfitP(-1, SYMBOL_5)+ProfitP(-1, SYMBOL_10)+ProfitP(-1, SYMBOL_14)+ProfitP(-1, SYMBOL_17)+ProfitP(-1, SYMBOL_19)+ProfitP(-1, SYMBOL_21)+ProfitP(-1, SYMBOL_28);
double P7=ProfitP(-1, SYMBOL_6)+ProfitP(-1, SYMBOL_11)+ProfitP(-1, SYMBOL_5)+ProfitP(-1, SYMBOL_18)+ProfitP(-1, SYMBOL_20)+ProfitP(-1, SYMBOL_21)+ProfitP(-1, SYMBOL_26);

double ProfProc=(AccountBalance()/100)*ProfitProcent;

if(P1>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_1);
CloserSP(SYMBOL_1);
CloserBP(SYMBOL_2);
CloserSP(SYMBOL_2);
CloserBP(SYMBOL_3);
CloserSP(SYMBOL_3);
CloserBP(SYMBOL_4);
CloserSP(SYMBOL_4);
CloserBP(SYMBOL_5);
CloserSP(SYMBOL_5);
CloserBP(SYMBOL_6);
CloserSP(SYMBOL_6);
CloserBP(SYMBOL_22);
CloserSP(SYMBOL_22);}
if(P2>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_7);
CloserSP(SYMBOL_7);
CloserBP(SYMBOL_8);
CloserSP(SYMBOL_8);
CloserBP(SYMBOL_9);
CloserSP(SYMBOL_9);
CloserBP(SYMBOL_10);
CloserSP(SYMBOL_10);
CloserBP(SYMBOL_11);
CloserSP(SYMBOL_11);
CloserBP(SYMBOL_1);
CloserSP(SYMBOL_1);
CloserBP(SYMBOL_23);
CloserSP(SYMBOL_23);}
if(P3>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_16);
CloserSP(SYMBOL_16);
CloserBP(SYMBOL_17);
CloserSP(SYMBOL_17);
CloserBP(SYMBOL_18);
CloserSP(SYMBOL_18);
CloserBP(SYMBOL_3);
CloserSP(SYMBOL_3);
CloserBP(SYMBOL_12);
CloserSP(SYMBOL_12);
CloserBP(SYMBOL_8);
CloserSP(SYMBOL_8);
CloserBP(SYMBOL_25);
CloserSP(SYMBOL_25);}
if(P4>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_12);
CloserSP(SYMBOL_12);
CloserBP(SYMBOL_13);
CloserSP(SYMBOL_13);
CloserBP(SYMBOL_14);
CloserSP(SYMBOL_14);
CloserBP(SYMBOL_15);
CloserSP(SYMBOL_15);
CloserBP(SYMBOL_7);
CloserSP(SYMBOL_7);
CloserBP(SYMBOL_2);
CloserSP(SYMBOL_2);
CloserBP(SYMBOL_24);
CloserSP(SYMBOL_24);}
if(P5>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_4);
CloserSP(SYMBOL_4);
CloserBP(SYMBOL_9);
CloserSP(SYMBOL_9);
CloserBP(SYMBOL_13);
CloserSP(SYMBOL_13);
CloserBP(SYMBOL_16);
CloserSP(SYMBOL_16);
CloserBP(SYMBOL_19);
CloserSP(SYMBOL_19);
CloserBP(SYMBOL_20);
CloserSP(SYMBOL_20);
CloserBP(SYMBOL_27);
CloserSP(SYMBOL_27);}
if(P6>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_5);
CloserSP(SYMBOL_5);
CloserBP(SYMBOL_10);
CloserSP(SYMBOL_10);
CloserBP(SYMBOL_14);
CloserSP(SYMBOL_14);
CloserBP(SYMBOL_17);
CloserSP(SYMBOL_17);
CloserBP(SYMBOL_19);
CloserSP(SYMBOL_19);
CloserBP(SYMBOL_21);
CloserSP(SYMBOL_21);
CloserBP(SYMBOL_28);
CloserSP(SYMBOL_28);}
if(P7>=ProfProc && ProfitProcent!=0)
{CloserBP(SYMBOL_6);
CloserSP(SYMBOL_6);
CloserBP(SYMBOL_11);
CloserSP(SYMBOL_11);
CloserBP(SYMBOL_15);
CloserSP(SYMBOL_15);
CloserBP(SYMBOL_18);
CloserSP(SYMBOL_18);
CloserBP(SYMBOL_20);
CloserSP(SYMBOL_20);
CloserBP(SYMBOL_21);
CloserSP(SYMBOL_21);
CloserBP(SYMBOL_26);
CloserSP(SYMBOL_26);}

double StopProc=(AccountBalance()/100)*StopProcent*(-1);

if(Profit(-1)>=ProfProc && ProfitProcent!=0)
{CloserB(); CloserS();}

if(Profit(-1)<StopProc && StopProcent!=0)
{CloserB(); CloserS();}
//--------------------------------------------------------------------+
// 项赅琨忄屐 桧纛痨圉棹 磬 沭圄桕? |
//--------------------------------------------------------------------+
CSSComent();
//--------------------------------------------------------------------+
return(0);}
//--------------------------------------------------------------------+
// 痒弪麒?铕溴痤? |
//--------------------------------------------------------------------+
int Count(int type,string sy)
{int count=0;
for(int i=OrdersTotal()-1;i>=0;i--){
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{if(sy==OrderSymbol() && OrderMagicNumber()==Magic && (type==-1 || OrderType()==type)) count++;}}
return(count);}

int Count2(int type,string sy)
{int count=0;
for(int i=OrdersHistoryTotal()-1;i>=0;i--){
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
{if(sy==OrderSymbol() && OrderMagicNumber()==Magic && OrderOpenTime()>=iTime(sy,FrameBar,0) && (type==-1 || OrderType()==type)) count++;}}
return(count);}
//--------------------------------------------------------------------+
// 袜躅滂?鲥眢 镱耠邃礤泐 徉? |
//--------------------------------------------------------------------+
double OldPricB(string sy)
{double oldorderopenpriceB;
int oldticketnumberB;
double unusedB = 0;
int ticketnumberB = 0;
for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--)
{if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))
{if (OrderSymbol() == sy && OrderType() == OP_BUY && OrderMagicNumber()==Magic)
{oldticketnumberB = OrderTicket();
if (oldticketnumberB > ticketnumberB)
{ticketnumberB = oldticketnumberB;
oldorderopenpriceB = OrderOpenPrice();
unusedB = oldorderopenpriceB;}}}}
return (oldorderopenpriceB);}
//--------------------------------------------------------------------+
// 袜躅滂?鲥眢 镱耠邃礤泐 皴腚 |
//--------------------------------------------------------------------+
double OldPricS(string sy)
{double oldorderopenpriceS;
int oldticketnumberS;
double unusedS = 0;
int ticketnumberS = 0;
for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--)
{if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))
{if (OrderSymbol() == sy && OrderType() == OP_SELL && OrderMagicNumber()==Magic)
{oldticketnumberS = OrderTicket();
if (oldticketnumberS > ticketnumberS)
{ticketnumberS = oldticketnumberS;
oldorderopenpriceS = OrderOpenPrice();
unusedS = oldorderopenpriceS;}}}}
return (oldorderopenpriceS);}
//--------------------------------------------------------------------+
// 痒弪麒?镳栳?怦艴 铕溴痤? |
//--------------------------------------------------------------------+
double Profit(int type)
{double Profit = 0;
for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))
{if (OrderMagicNumber()==Magic && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}

double ProfitP(int type, string sy)
{double Profit = 0;
for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))
{if (OrderSymbol() == sy && OrderMagicNumber()==Magic && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 皴泐漤 |
//--------------------------------------------------------------------+
double ProfitDey(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),1440,0) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 怊屦? |
//--------------------------------------------------------------------+
double ProfitTuDey(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),1440,1) && OrderCloseTime()<iTime(Symbol(),1440,0) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 镱玎怊屦? |
//--------------------------------------------------------------------+
double ProfitEsTuDey(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),1440,2) && OrderCloseTime()<iTime(Symbol(),1440,1) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 礤溴膻 |
//--------------------------------------------------------------------+
double ProfitWeek(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),10080,0) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 戾?? |
//--------------------------------------------------------------------+
double ProfitMontag(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),43200,0) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 痒弪麒?玎翳犟桊钼囗铋 镳栳?玎 戾?? |
//--------------------------------------------------------------------+
double ProfitAllTime(int type)
{double Profit = 0;
for (int cnt = OrdersHistoryTotal() - 1; cnt >= 0; cnt--) {
if(OrderSelect(cnt, SELECT_BY_POS, MODE_HISTORY))
{if (OrderMagicNumber()==Magic && OrderCloseTime()>=iTime(Symbol(),43200,24) && (OrderType() == type || type==-1)) Profit += OrderProfit()+OrderSwap()+OrderCommission();}}
return (Profit);}
//--------------------------------------------------------------------+
// 青牮桢 铕溴痤?徉??皴腚 |
//--------------------------------------------------------------------+
void CloserS()
{for(int i=OrdersTotal()-1;i>=0;i--)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{if(OrderMagicNumber()==Magic && OrderType()==OP_SELL)
bool sel1=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(MarketInfo(OrderSymbol(),MODE_ASK), Digits),100,0);}}
void CloserB()
{for(int i=OrdersTotal()-1;i>=0;i--)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{if(OrderMagicNumber()==Magic && OrderType()==OP_BUY)
bool sel2=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(MarketInfo(OrderSymbol(),MODE_BID), Digits),100,0);}}

void CloserSP(string sy)
{for(int i=OrdersTotal()-1;i>=0;i--)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{if(OrderSymbol() == sy && OrderMagicNumber()==Magic && OrderType()==OP_SELL)
bool sel1=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(MarketInfo(OrderSymbol(),MODE_ASK), Digits),100,0);}}
void CloserBP(string sy)
{for(int i=OrdersTotal()-1;i>=0;i--)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{if(OrderSymbol() == sy && OrderMagicNumber()==Magic && OrderType()==OP_BUY)
bool sel2=OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(MarketInfo(OrderSymbol(),MODE_BID), Digits),100,0);}}
//--------------------------------------------------------------------+
// CSS 恹忸溧 桧纛痨圉梃 磬 沭圄桕 |
//--------------------------------------------------------------------+
void CSSComent() {
if (IsTesting() && !IsVisualMode()) return;
if (ObjectFind("BG") < 0) {
ObjectCreate("BG", OBJ_LABEL, 0, 0, 0);
ObjectSetText("BG", "g", 150, "Webdings", White);
ObjectSet("BG", OBJPROP_CORNER, 0);
ObjectSet("BG", OBJPROP_BACK, TRUE);
ObjectSet("BG", OBJPROP_XDISTANCE, 0);
ObjectSet("BG", OBJPROP_YDISTANCE, 15);
}
if (ObjectFind("BG1") < 0) {
ObjectCreate("BG1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("BG1", "g", 150, "Webdings", DimGray);
ObjectSet("BG1", OBJPROP_BACK, FALSE);
ObjectSet("BG1", OBJPROP_XDISTANCE, 0);
ObjectSet("BG1", OBJPROP_YDISTANCE, 42);
}
if (ObjectFind("BG2") < 0) {
ObjectCreate("BG2", OBJ_LABEL, 0, 0, 0);
ObjectSetText("BG2", "g", 150, "Webdings", DimGray);
ObjectSet("BG2", OBJPROP_CORNER, 0);
ObjectSet("BG2", OBJPROP_BACK, TRUE);
ObjectSet("BG2", OBJPROP_XDISTANCE, 0);
ObjectSet("BG2", OBJPROP_YDISTANCE, 42);
}
if (ObjectFind("NAME") < 0) {
ObjectCreate("NAME", OBJ_LABEL, 0, 0, 0);
ObjectSetText("NAME", "燕轵 耦忮蝽桕?FXMOMENT.RU", 9, "Arial Bold", Black);
ObjectSet("NAME", OBJPROP_CORNER, 0);
ObjectSet("NAME", OBJPROP_BACK, FALSE);
ObjectSet("NAME", OBJPROP_XDISTANCE, 5);
ObjectSet("NAME", OBJPROP_YDISTANCE, 23);
}
if (ObjectFind("BG3") < 0) {
ObjectCreate("BG3", OBJ_LABEL, 0, 0, 0);
ObjectSetText("BG3", "g", 110, "Webdings", DimGray);
ObjectSet("BG3", OBJPROP_CORNER, 0);
ObjectSet("BG3", OBJPROP_BACK, TRUE);
ObjectSet("BG3", OBJPROP_XDISTANCE, 0);
ObjectSet("BG3", OBJPROP_YDISTANCE, 73);
}
if (ObjectFind("BG5") < 0) {
ObjectCreate("BG5", OBJ_LABEL, 0, 0, 0);
ObjectSetText("BG5", "g", 150, "Webdings", DimGray);
ObjectSet("BG5", OBJPROP_CORNER, 0);
ObjectSet("BG5", OBJPROP_BACK, FALSE);
ObjectSet("BG5", OBJPROP_XDISTANCE, 0);
ObjectSet("BG5", OBJPROP_YDISTANCE, 73);
}
Coment();
}
//--------------------------------------------------------------------+
// 蔓忸?桧纛痨圉梃 磬 沭圄桕 |
//--------------------------------------------------------------------+
void Coment() {
Comment(""
+ "\n"
+ "_______________________________________"
+ "\n"
+ "\n"
+ "韧晕刑乐冗 ?炎乓?
+ "\n"
+ "_______________________________________"
+ "\n"
+ "皖戾?聍弪? " + AccountNumber()
+ "\n"
+ "想鬻? 1:" + DoubleToStr(AccountLeverage(), 0)
+ "\n"
+ "拎豚眈: " + DoubleToStr(AccountBalance(), 2)
+ "\n"
+ "佯邃耱忄: " + DoubleToStr(AccountEquity(), 2)
+ "\n"
+ "吗屐 皴疴屦? " + TimeToStr(TimeCurrent(), TIME_SECONDS)
+ "\n"
+ "_______________________________________"
+ "\n"
+ "\n"
+ "椅忻温肋 韧晕刑乐冗 "
+ "\n"
+ "_______________________________________"
+ "\n"
+ "义牦?镳铘栩: " + DoubleToStr(Profit(-1), 2)
+ "\n"
+ "橡铘栩 玎 皴泐漤: " + DoubleToStr(ProfitDey(-1), 2)
+ "\n"
+ "橡铘栩 玎 怊屦? " + DoubleToStr(ProfitTuDey(-1), 2)
+ "\n"
+ "橡铘栩 玎 镱玎怊屦? " + DoubleToStr(ProfitEsTuDey(-1), 2)
+ "\n"
+ "橡铘栩 玎 礤溴膻: " + DoubleToStr(ProfitWeek(-1), 2)
+ "\n"
+ "橡铘栩 玎 戾?? " + DoubleToStr(ProfitMontag(-1), 2)
+ "\n"
+ "橡铘栩 玎 怦?怵屐: " + DoubleToStr(ProfitAllTime(-1), 2)
);
}

相关资源

暂无评论

暂无评论...