代码拉取完成,页面将自动刷新
同步操作将从 航耍耍/mql4 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#property copyright "http://manlyfx.com/ ##招财主制作##"
#property link ""
extern string HeadLine = " http://manlyfx.com/";
extern string BuyBlock = "-------QQ;271295326-------";
double gd_92 = 1.0;
extern int Profit = 60;
extern int gi_104 = 10;
double gd_108 = 1.0;
extern int gi_116 = 10;
extern string GeneralBlock = "-------放在欧美1小时自动交易28种货币对------";
extern int 间隔加码点数 = 10;
extern int Prosadka = 700;
extern int Povtor = 1;
int g_timeframe_140 = PERIOD_M1;
int g_timeframe_144 = PERIOD_M1;
bool gi_148 = FALSE;
int g_timeframe_152 = PERIOD_M15;
bool gi_156 = FALSE;
extern string Rez = "-------高频刷单------";
extern bool Extremal = TRUE;
extern bool Lentyaj = FALSE;
extern string EXTr = "-------人工智能------";
extern double LotSize = 0.01;
extern double LotExponent = 1.;
extern int LotStep = 3000;
extern string OfficialVariable = "-------策略自己去看------";
extern string InformationOnChartString = "公司网址http://manlyfx.com/";
extern bool InformationOnChart = TRUE;
extern int MagicNumber = 123456789;
int g_datetime_228 = 0;
int g_datetime_232 = 0;
int gi_236 = 0;
int g_ticket_240;
int gi_244;
bool gi_248;
bool gi_252;
int Gi_260;
int Gi_261;
int G_magic_340 = 10533;
string G_comment_300 = "";
double g_lots_256;
double g_lots_264;
double g_lots_272;
double g_lots_280;
string g_comment_288;
string gs_296;
bool OpenNew = true;
bool OpenAdd0;
bool OpenAdd1;
double Gd_720[30];
double Gd_730[30];
double Gd_721[30];
double Gd_731[30];
double G_pos_260 = 0;
double Gd_184;
double G_order_open_price_150;
double G_order_open_price_158;
double G_order_open_price_151;
double G_order_open_price_159;
double G_order_open_price_152;
double G_order_open_price_153;
double G_order_open_price_160;
double G_order_open_price_161;
double Gd_168;
double Gd_176;
double Gd_192;
double Gd_200;
double Gd_208;
double Gd_216;
double Gd_217;
double Gd_218;
double Gd_219;
int Gi_720 = 0;
int Gi_721 = 0;
bool BoolClose;
bool Gi_256;
int Gi_268;
int Gi_272;
int Gi_336 = 3;
int Gi_276 = 1;
double G_lots_292 = 0.02;
double G_lots_290 = 0.02;
double Gd_300 = 1.5;
int Gi_323 = 0;
int Gi_324 = 0;
int Day0 = -1;
int init() {
ArrayInitialize(Gd_720,0);
ArrayInitialize(Gd_721,0);
ArrayInitialize(Gd_730,0);
ArrayInitialize(Gd_731,0);
gi_236 = LotDecimal();
if (Extremal) gi_156 = FALSE;
if (Extremal) gs_296 = "";
if (Lentyaj) gs_296 = "";
if (Extremal == Lentyaj) gs_296 = "";
return (0);
}
int deinit() {
return (0);
}
double OnTester() {
ButtonCreate("Button3","停止EA","停止EA",80,30,75,25,CORNER_RIGHT_LOWER,clrWhite,clrDarkOrange,clrOrange,false);
if(ObjectGetInteger(0,"Button3",OBJPROP_STATE)==1) {
ExpertRemove();
return(0);
}
ButtonCreate("Button4","暂停下单","正常下单",80,60,75,25,CORNER_RIGHT_LOWER,clrWhite,clrDarkOrange,clrOrange,false);
if(ObjectGetInteger(0,"Button4",OBJPROP_STATE)==1) {
OpenNew = false;
}
else OpenNew = true;
ButtonCreate("Button0","全部平仓","正在执行",80,90,75,25,CORNER_RIGHT_LOWER,clrWhite,clrRoyalBlue,clrDodgerBlue,false);
if(ObjectGetInteger(0,"Button0",OBJPROP_STATE)==1) {
CloseOrders(OP_BUY);
CloseOrders(OP_SELL);
ObjectSetInteger(0,"Button0",OBJPROP_STATE,0);
}
ButtonCreate("Button1","空单平仓","正在执行",80,120,75,25,CORNER_RIGHT_LOWER,clrWhite,clrFireBrick,clrRed,false);
if(ObjectGetInteger(0,"Button1",OBJPROP_STATE)==1) {
CloseOrders(OP_SELL);
ObjectSetInteger(0,"Button1",OBJPROP_STATE,0);
}
ButtonCreate("Button2","多单平仓","正在执行",80,150,75,25,CORNER_RIGHT_LOWER,clrWhite,clrForestGreen,clrLimeGreen,false);
if(ObjectGetInteger(0,"Button2",OBJPROP_STATE)==1) {
CloseOrders(OP_BUY);
ObjectSetInteger(0,"Button2",OBJPROP_STATE,0);
}
ButtonCreate("Button5","手工加空","正在执行",80,180,75,25,CORNER_RIGHT_LOWER,clrWhite,clrFireBrick,clrRed,false);
if(ObjectGetInteger(0,"Button5",OBJPROP_STATE)==1) {
OpenAdd1 = true;
ObjectSetInteger(0,"Button5",OBJPROP_STATE,0);
}
ButtonCreate("Button6","手工加多","正在执行",80,210,75,25,CORNER_RIGHT_LOWER,clrWhite,clrForestGreen,clrLimeGreen,false);
if(ObjectGetInteger(0,"Button6",OBJPROP_STATE)==1) {
OpenAdd0 = true;
ObjectSetInteger(0,"Button6",OBJPROP_STATE,0);
}
return(0);
}
void OnTimer()
{
ButtonCreate("Button3","停止EA","停止EA",80,30,75,25,CORNER_RIGHT_LOWER,clrWhite,clrDarkOrange,clrOrange,false);
if(ObjectGetInteger(0,"Button3",OBJPROP_STATE)==1) {
ExpertRemove();
return;
}
ButtonCreate("Button4","暂停下单","正常下单",80,60,75,25,CORNER_RIGHT_LOWER,clrWhite,clrDarkOrange,clrOrange,false);
if(ObjectGetInteger(0,"Button4",OBJPROP_STATE)==1) {
OpenNew = false;
}
else OpenNew = true;
ButtonCreate("Button0","全部平仓","正在执行",80,90,75,25,CORNER_RIGHT_LOWER,clrWhite,clrRoyalBlue,clrDodgerBlue,false);
if(ObjectGetInteger(0,"Button0",OBJPROP_STATE)==1) {
CloseOrders(OP_BUY);
CloseOrders(OP_SELL);
ObjectSetInteger(0,"Button0",OBJPROP_STATE,0);
}
ButtonCreate("Button1","空单平仓","正在执行",80,120,75,25,CORNER_RIGHT_LOWER,clrWhite,clrFireBrick,clrRed,false);
if(ObjectGetInteger(0,"Button1",OBJPROP_STATE)==1) {
CloseOrders(OP_SELL);
ObjectSetInteger(0,"Button1",OBJPROP_STATE,0);
}
ButtonCreate("Button2","多单平仓","正在执行",80,150,75,25,CORNER_RIGHT_LOWER,clrWhite,clrForestGreen,clrLimeGreen,false);
if(ObjectGetInteger(0,"Button2",OBJPROP_STATE)==1) {
CloseOrders(OP_BUY);
ObjectSetInteger(0,"Button2",OBJPROP_STATE,0);
}
ButtonCreate("Button5","手工加空","正在执行",80,180,75,25,CORNER_RIGHT_LOWER,clrWhite,clrFireBrick,clrRed,false);
if(ObjectGetInteger(0,"Button5",OBJPROP_STATE)==1) {
OpenAdd1 = true;
ObjectSetInteger(0,"Button5",OBJPROP_STATE,0);
}
ButtonCreate("Button6","手工加多","正在执行",80,210,75,25,CORNER_RIGHT_LOWER,clrWhite,clrForestGreen,clrLimeGreen,false);
if(ObjectGetInteger(0,"Button6",OBJPROP_STATE)==1) {
OpenAdd0 = true;
ObjectSetInteger(0,"Button6",OBJPROP_STATE,0);
}
}
void CloseOrders(int A_cmd_0) {
string NameObject;
if(A_cmd_0 == 0) {
Gi_720 = 0;
for(int i = 0;i < ObjectsTotal();i++) {
NameObject = ObjectName(i);
if(StringFind(NameObject,"xxxxxxx0",0) >= 0) {
ShowArrow1(0,StringSubstr(NameObject,8,StringLen(NameObject) - 8),ObjectGet(NameObject,OBJPROP_TIME1));
}
}
ArrayInitialize(Gd_720,0);
ArrayInitialize(Gd_730,0);
ObjectsDeleteAll(0,"xxxxxxx0",0,OBJ_HLINE);
ObjectsDeleteAll(0,"xxxxxxx2",0,OBJ_TEXT);
}
if(A_cmd_0 == 1) {
Gi_721 = 0;
for(i = 0;i < ObjectsTotal();i++) {
NameObject = ObjectName(i);
if(StringFind(NameObject,"xxxxxxx1",0) >= 0) {
ShowArrow1(1,StringSubstr(NameObject,8,StringLen(NameObject) - 8),ObjectGet(NameObject,OBJPROP_TIME1));
}
}
ArrayInitialize(Gd_721,0);
ArrayInitialize(Gd_731,0);
ObjectsDeleteAll(0,"xxxxxxx1",0,OBJ_HLINE);
ObjectsDeleteAll(0,"xxxxxxx3",0,OBJ_TEXT);
}
BoolClose = true;
for (int pos_4 = OrdersTotal() - 1; pos_4 >= 0; pos_4--) {
if (OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
if (OrderType() == A_cmd_0) Gi_256 = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Gi_336 * Gi_276, Yellow);
}
}
}
int start(){
if(!IsTesting() && MathAbs(Day() - Day0) > 5) {
ObjectsDeleteAll();
Day0 = Day();
}
if(IsTesting()) OnTester();
else OnTimer();
if (gi_236 == 0) gi_236 = LotDecimal();
Information();
if (Extremal != Lentyaj) {
gi_248 = TRUE;
gi_252 = TRUE;
}
if (g_datetime_228 != iTime(NULL, g_timeframe_140, 0)) {
g_ticket_240 = 0;
gi_244 = CountTrades("buy");
if (gi_244 == 0 && gi_248 == TRUE) {
g_comment_288 = "nishiwangge " + Symbol() + " - Buy " + ((gi_244 + 1));
g_lots_272 = NewLot("buy");
while (g_ticket_240 < 1) {
Print("" + Symbol() + ", " + DoubleToStr(g_lots_272, 2) + ", " + DoubleToStr(Ask, 4) + ", " + g_comment_288 + " " +
MagicNumber);
g_ticket_240 = OrderSend(Symbol(), OP_BUY, g_lots_272, Ask, 3, 0, 0, g_comment_288, MagicNumber, 0, Blue);
if (g_ticket_240 < 1) {
Print(": ", GetLastError(), " " + (60 * Povtor) + " ");
Sleep(1000 * (60 * Povtor));
} else 裲rrect("buy");
RefreshRates();
}
}
gi_244 = CountTrades("sell");
if (gi_244 == 0 && gi_252 == TRUE) {
g_comment_288 = "nishiwangge " + Symbol() + " - Sell " + ((gi_244 + 1));
g_lots_280 = NewLot("sell");
while (g_ticket_240 < 1) {
Print("" + Symbol() + ", " + DoubleToStr(g_lots_280, 2) + ", =" + DoubleToStr(Bid, 4) + ", " + g_comment_288 + " " +
MagicNumber);
g_ticket_240 = OrderSend(Symbol(), OP_SELL, g_lots_280, Bid, 3, 0, 0, g_comment_288, MagicNumber, 0, Red);
if (g_ticket_240 < 1) {
Print(": ", GetLastError(), "" + (60 * Povtor) + " ");
Sleep(1000 * (60 * Povtor));
} else 裲rrect("sell");
RefreshRates();
}
}
g_datetime_228 = iTime(NULL, g_timeframe_140, 0);
}
if (g_datetime_232 != iTime(NULL, g_timeframe_144, 0)) {
g_ticket_240 = 0;
gi_244 = CountTrades("buy");
if (gi_244 > 0 && NextOrder("buy")) {
g_comment_288 = "nishiwangge " + Symbol() + " - Buy " + ((gi_244 + 1));
g_lots_256 = NextLot("buy");
while (g_ticket_240 < 1) {
Print(":" + Symbol() + ", " + DoubleToStr(g_lots_256, 2) + ", " + DoubleToStr(Ask, 4) + ", " + g_comment_288 +
", " + MagicNumber);
g_ticket_240 = OrderSend(Symbol(), OP_BUY, g_lots_256, Ask, 3, 0, 0, g_comment_288, MagicNumber, 0, Blue);
if (g_ticket_240 < 1) {
Print(": ", GetLastError(), "" + (60 * Povtor) + " ");
Sleep(1000 * (60 * Povtor));
} else 裲rrect("buy");
RefreshRates();
}
}
gi_244 = CountTrades("sell");
if (gi_244 > 0 && NextOrder("sell")) {
g_comment_288 = "nishiwangge " + Symbol() + " - Sell " + ((gi_244 + 1));
g_lots_264 = NextLot("sell");
while (g_ticket_240 < 1) {
Print(":" + Symbol() + ", " + DoubleToStr(g_lots_264, 2) + ", " + DoubleToStr(Bid, 4) + ", " + g_comment_288 + ", " +
MagicNumber);
g_ticket_240 = OrderSend(Symbol(), OP_SELL, g_lots_264, Bid, 3, 0, 0, g_comment_288, MagicNumber, 0, Red);
if (g_ticket_240 < 1) {
Print(": ", GetLastError(), " " + (60 * Povtor) + " ");
Sleep(1000 * (60 * Povtor));
} else 裲rrect("sell");
RefreshRates();
}
}
g_datetime_232 = iTime(NULL, g_timeframe_144, 0);
}
return (0);
}
void 裲rrect(string as_0) {
double l_price_8;
double l_price_16 = AveragePrice(as_0);
for (int l_pos_24 = OrdersTotal() - 1; l_pos_24 >= 0; l_pos_24--) {
OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
if (as_0 == "buy") {
if (OrderType() == OP_BUY) {
l_price_8 = l_price_16 + Profit * Point;
if (OrderTakeProfit() != l_price_8) {
Print(" " + DoubleToStr(l_price_16, 4) + ", " + Profit + " " + DoubleToStr(l_price_8, 4));
OrderModify(OrderTicket(), l_price_16, OrderStopLoss(), l_price_8, 0, Yellow);
}
}
}
if (as_0 == "sell") {
if (OrderType() == OP_SELL) {
l_price_8 = l_price_16 - Profit * Point;
if (OrderTakeProfit() != l_price_8) {
Print(" " + DoubleToStr(l_price_16, 4) + ", " + Profit + " " + DoubleToStr(l_price_8, 4));
OrderModify(OrderTicket(), l_price_16, OrderStopLoss(), l_price_8, 0, Yellow);
}
}
}
}
}
}
double NewLot(string as_0) {
double ld_ret_8;
double l_minlot_16 = MarketInfo(Symbol(), MODE_MINLOT);
if (as_0 == "buy") {
if (gi_156) ld_ret_8 = LotSize;
else ld_ret_8 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / LotStep, 0), gi_236);
}
if (as_0 == "sell") {
if (gi_156) ld_ret_8 = LotSize;
else ld_ret_8 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / LotStep, 0), gi_236);
}
if (ld_ret_8 < l_minlot_16) ld_ret_8 = l_minlot_16;
return (ld_ret_8);
}
double NextLot(string as_0) {
double ld_ret_8;
if (Lentyaj) LotExponent = LotExponent();
if (as_0 == "buy") ld_ret_8 = NormalizeDouble(FindLastOrder(as_0, "Lots") * LotExponent, gi_236);
if (as_0 == "sell") ld_ret_8 = NormalizeDouble(FindLastOrder(as_0, "Lots") * LotExponent, gi_236);
return (ld_ret_8);
}
double LotExponent() {
double ld_0 = 0;
double ld_ret_8 = 1;
while (ld_0 < AccountBalance()) {
ld_ret_8 = (100.0 * ld_ret_8 + 1.0) / 100.0;
ld_0 = 0;
for (int li_16 = 0; li_16 <= 5; li_16++) ld_0 += 10.0 * (LotSize * MathPow(ld_ret_8, li_16) * (Prosadka - 间隔加码点数 * li_16));
for (li_16 = 6; li_16 <= 9; li_16++) ld_0 += 10.0 * (LotSize * MathPow(ld_ret_8, li_16) * (Prosadka - Prosadka / 10));
for (li_16 = 10; li_16 <= 11; li_16++) ld_0 += 10.0 * (LotSize * MathPow(ld_ret_8, li_16) * (Prosadka - Prosadka / 6));
ld_0 += 10.0 * (LotSize * MathPow(ld_ret_8, 12) * (Prosadka - Prosadka / 4));
}
Print(" " + DoubleToStr(ld_ret_8, 2));
return (ld_ret_8);
}
int NextOrder(string as_0) {
int li_8;
bool li_ret_12 = FALSE;
double l_iclose_16 = iClose(Symbol(), g_timeframe_152, 1);
double l_iopen_24 = iOpen(Symbol(), g_timeframe_152, 1);
if (as_0 == "buy") {
li_8 = NormalizeDouble(间隔加码点数 * MathPow(gd_92, CountTrades(as_0)), 0);
if (CountTrades(as_0) == 7) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 8) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 9) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 10) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 11) li_8 = Prosadka / 6;
if (CountTrades(as_0) == 12) li_8 = Prosadka / 6;
if (CountTrades(as_0) == 13) li_8 = Prosadka / 4;
if (FindLastOrder(as_0, "Price") - Ask >= li_8 * Point && CountTrades(as_0) < gi_104) {
if (gi_148) {
if (l_iopen_24 <= l_iclose_16) li_ret_12 = TRUE;
else li_ret_12 = FALSE;
} else li_ret_12 = TRUE;
}
}
if (as_0 == "sell") {
li_8 = NormalizeDouble(间隔加码点数 * MathPow(gd_108, CountTrades(as_0)), 0);
if (CountTrades(as_0) == 7) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 8) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 9) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 10) li_8 = Prosadka / 10;
if (CountTrades(as_0) == 11) li_8 = Prosadka / 6;
if (CountTrades(as_0) == 12) li_8 = Prosadka / 6;
if (CountTrades(as_0) == 13) li_8 = Prosadka / 4;
if (Bid - FindLastOrder(as_0, "Price") >= li_8 * Point && CountTrades(as_0) < gi_116) {
if (gi_148) {
if (l_iopen_24 >= l_iclose_16) li_ret_12 = TRUE;
else li_ret_12 = FALSE;
} else li_ret_12 = TRUE;
}
}
return (li_ret_12);
}
double FindLastOrder(string as_0, string as_8) {
double l_ord_open_price_16;
double l_ord_lots_24;
int l_ticket_32 = 0;
for (int l_pos_36 = OrdersTotal() - 1; l_pos_36 >= 0; l_pos_36--) {
OrderSelect(l_pos_36, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
if (as_0 == "buy") {
if (OrderType() == OP_BUY) {
if (OrderTicket() > l_ticket_32) {
l_ord_open_price_16 = OrderOpenPrice();
l_ord_lots_24 = OrderLots();
l_ticket_32 = OrderTicket();
}
}
}
if (as_0 == "sell") {
if (OrderType() == OP_SELL) {
if (OrderTicket() > l_ticket_32) {
l_ord_open_price_16 = OrderOpenPrice();
l_ord_lots_24 = OrderLots();
l_ticket_32 = OrderTicket();
}
}
}
}
}
if (as_8 == "Price") return (l_ord_open_price_16);
if (as_8 == "Lots") return (l_ord_lots_24);
return (0.0);
}
int CountTrades(string as_0) {
int l_count_8 = 0;
for (int l_pos_12 = OrdersTotal() - 1; l_pos_12 >= 0; l_pos_12--) {
OrderSelect(l_pos_12, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
if (as_0 == "buy")
if (OrderType() == OP_BUY) l_count_8++;
if (as_0 == "sell")
if (OrderType() == OP_SELL) l_count_8++;
}
}
return (l_count_8);
}
double AveragePrice(string as_0) {
double ld_8 = 0;
double ld_16 = 0;
for (int l_pos_24 = OrdersTotal() - 1; l_pos_24 >= 0; l_pos_24--) {
OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
if (as_0 == "buy") {
if (OrderType() == OP_BUY) {
ld_8 += OrderOpenPrice() * OrderLots();
ld_16 += OrderLots();
}
}
if (as_0 == "sell") {
if (OrderType() == OP_SELL) {
ld_8 += OrderOpenPrice() * OrderLots();
ld_16 += OrderLots();
}
}
}
}
ld_8 = NormalizeDouble(ld_8 / ld_16, Digits);
return (ld_8);
}
void Information() {
}
double Balance(string as_0, string as_8) {
double ld_ret_16 = 0;
for (int l_pos_24 = OrdersTotal() - 1; l_pos_24 >= 0; l_pos_24--) {
OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
if (as_0 == "buy") {
if (OrderType() == OP_BUY) {
if (as_8 == "Balance") ld_ret_16 = ld_ret_16 + OrderProfit() - OrderSwap() - OrderCommission();
if (as_8 == "Lot") ld_ret_16 += OrderLots();
}
}
if (as_0 == "sell") {
if (OrderType() == OP_SELL) {
if (as_8 == "Balance") ld_ret_16 = ld_ret_16 + OrderProfit() - OrderSwap() - OrderCommission();
if (as_8 == "Lot") ld_ret_16 += OrderLots();
}
}
}
}
return (ld_ret_16);
}
double LotDecimal() {
double l_lotstep_0 = MarketInfo(Symbol(), MODE_LOTSTEP);
int li_ret_8 = MathCeil(MathAbs(MathLog(l_lotstep_0) / MathLog(10)));
return (li_ret_8);
}
void ButtonCreate(string Name,string txt1,string txt2,int XX,int YX,int XL,int YL,int WZ,color clr,color back_clr,color border_clr,bool ZHClr) {
if(ObjectFind(0,Name)==-1) {
ObjectCreate(0,Name,OBJ_BUTTON,0,0,0);
ObjectSetInteger(0,Name,OBJPROP_XDISTANCE,XX);
ObjectSetInteger(0,Name,OBJPROP_YDISTANCE,YX);
ObjectSetInteger(0,Name,OBJPROP_XSIZE,XL);
ObjectSetInteger(0,Name,OBJPROP_YSIZE,YL);
ObjectSetInteger(0,Name,OBJPROP_CORNER,WZ);
ObjectSetString(0,Name,OBJPROP_FONT,"微软雅黑");
ObjectSetInteger(0,Name,OBJPROP_FONTSIZE,13);
ObjectSetInteger(0,Name,OBJPROP_BORDER_COLOR,border_clr);
}
if(ObjectGetInteger(0,Name,OBJPROP_STATE)==1) {
if(ZHClr) {
ObjectSetInteger(0,Name,OBJPROP_COLOR,back_clr);
ObjectSetInteger(0,Name,OBJPROP_BGCOLOR,clr);
}
ObjectSetString(0,Name,OBJPROP_TEXT,txt2);
}
else {
ObjectSetInteger(0,Name,OBJPROP_COLOR,clr);
ObjectSetInteger(0,Name,OBJPROP_BGCOLOR,back_clr);
ObjectSetString(0,Name,OBJPROP_TEXT,txt1);
}
}
void ShowArrow1(int A_cmd_0,int A_count_0,int OpenTime) {
string name;
string Type;
int Arrow;
int Gi_325;
color Color;
double OpenPrice;
double ClosePrice;
double OrderLots0 = MathMin(G_lots_290,NormalizeDouble(G_lots_292 * MathPow(Gd_300, A_count_0), 4));
if(A_cmd_0 == 0) {
Arrow = 1;
Color = Blue;
Type = "buy";
OpenPrice = Gd_730[A_count_0];
ClosePrice = Bid;
Gi_325 = Gi_323;
}
if(A_cmd_0 == 1) {
Arrow = 2;
Color = Red;
Type = "sell";
OpenPrice = Gd_731[A_count_0];
ClosePrice = Ask;
Gi_325 = Gi_324;
}
}
void CountOrders() {
Gi_268 = Gi_720;
Gi_272 = Gi_721;
Gi_260 = 0;
Gi_261 = 0;
Gd_216 = 0;
Gd_218 = 0;
if(Gd_184 > 0) Gd_216 = Gd_184 * (Bid - (Gd_200 / Gd_184)) * MarketInfo(Symbol(),MODE_TICKVALUE);
if(Gd_192 > 0) Gd_218 = Gd_192 * ((Gd_208 / Gd_192) - Ask) * MarketInfo(Symbol(),MODE_TICKVALUE);
if(Gi_720 > 0) G_order_open_price_150 = Gd_730[Gi_720-1];
G_order_open_price_151 = 0;
if(Gi_721 > 0) G_order_open_price_158 = Gd_731[Gi_721-1];
G_order_open_price_159 = 0;
G_order_open_price_152 = 10000;
G_order_open_price_153 = 0;
if(Gd_184 > 0) {
G_order_open_price_152 = MathMin(Gd_730[0],Gd_730[Gi_720-1]);
G_order_open_price_153 = MathMax(Gd_730[0],Gd_730[Gi_720-1]);
}
G_order_open_price_160 = 0;
G_order_open_price_161 = 10000;
if(Gd_192 > 0) {
G_order_open_price_160 = MathMax(Gd_731[0],Gd_731[Gi_721-1]);
G_order_open_price_161 = MathMin(Gd_731[0],Gd_731[Gi_721-1]);
}
Gd_168 = 0;
Gd_176 = 0;
for (G_pos_260 = 0; G_pos_260 < OrdersTotal(); G_pos_260++) {
if (OrderSelect(G_pos_260, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == G_magic_340) {
G_comment_300 = OrderComment();
if(StringFind(G_comment_300,"_",0) < 0) {
Alert("定单注释异常 = ",G_comment_300);
ExpertRemove();
break;
}
if (OrderType() == OP_BUY) {
Gi_268 = StrToInteger(StringSubstr(G_comment_300,StringFind(G_comment_300,"_",0)+1,StringLen(G_comment_300)-StringFind(G_comment_300,"_",0)-1))+1;
Gi_260++;
Gd_184 += OrderLots();
Gd_200 += OrderOpenPrice() * OrderLots();
Gd_216 += OrderProfit() + OrderSwap() + OrderCommission();
G_order_open_price_150 = OrderOpenPrice();
G_order_open_price_151 = OrderClosePrice();
G_order_open_price_152 = MathMin(G_order_open_price_152,OrderOpenPrice());
G_order_open_price_153 = MathMax(G_order_open_price_153,OrderOpenPrice());
}
if (OrderType() == OP_SELL) {
Gi_272 = StrToInteger(StringSubstr(G_comment_300,StringFind(G_comment_300,"_",0)+1,StringLen(G_comment_300)-StringFind(G_comment_300,"_",0)-1))+1;
Gi_261++;
Gd_192 += OrderLots();
Gd_208 += OrderOpenPrice() * OrderLots();
Gd_218 += OrderProfit() + OrderSwap() + OrderCommission();
G_order_open_price_158 = OrderOpenPrice();
G_order_open_price_159 = OrderClosePrice();
G_order_open_price_160 = MathMax(G_order_open_price_160,OrderOpenPrice());
G_order_open_price_161 = MathMin(G_order_open_price_161,OrderOpenPrice());
}
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。