代码拉取完成,页面将自动刷新
#property copyright "1317079233 横扫千军如卷席"
//enum ENUM_TIMEFRAMES {PERIOD_CURRENT = 0, PERIOD_M1 = 1, PERIOD_M2 = 2, PERIOD_M3 = 3, PERIOD_M4 = 4, PERIOD_M5 = 5, PERIOD_M6 = 6, PERIOD_M10 = 10, PERIOD_M12 = 12, PERIOD_M15 = 15, PERIOD_M20 = 20, PERIOD_M30 = 30, PERIOD_H1 = 60, PERIOD_H2 = 120, PERIOD_H3 = 180, PERIOD_H4 = 240, PERIOD_H6 = 360, PERIOD_H8 = 480, PERIOD_H12 = 720, PERIOD_D1 = 1440, PERIOD_W1 = 10080, PERIOD_MN1 = 43200, };
extern string 授权密码="" ;
extern string 联系方式="QQ:1317079233" ;
extern double LotSize=0.01 ;
datetime zong_da_1 = StringToTime("2088/08/08 00:00:00");
string zong_st_2 = "##横扫千军如卷席##";
string zong_st_3 = " www.ea1000w.com.com";
string zong_st_4 = "-------踏入红尘中-------";
double zong_do_5 = 1.0;
int zong_in_6 = 35;
int zong_in_7 = 13;
double zong_do_8 = 1.0;
int zong_in_9 = 13;
string zong_st_10 = "-------何须求,为何争?------";
int zong_in_11 = 10;
int zong_in_12 = 700;
int zong_in_13 = 1;
int zong_in_14 = 1;
int zong_in_15 = 1;
bool zong_bo_16 = false;
int zong_in_17 = 15;
bool zong_bo_18 = false;
string zong_st_19 = "-------贪,贪的到吗?------";
bool zong_bo_20 = true;
bool zong_bo_21 = false;
string zong_st_22 = "-------躲,躲的过吗?------";
double zong_do_23 = 1.8;
int zong_in_24 = 88888;
string zong_st_25 = "-------怕死就不用死了吗?看淡就淡了吗------";
string zong_st_26 = "InformationOnChart - 答案是:活着就有问题!";
bool zong_bo_27 = true;
int zong_in_28 = 123456789;
int zong_in_29 = 0;
int zong_in_30 = 0;
int zong_in_31 = 0;
int zong_in_32 = 0;
int zong_in_33 = 0;
bool zong_bo_34 = false;
bool zong_bo_35 = false;
double zong_do_36 = 0.0;
double zong_do_37 = 0.0;
double zong_do_38 = 0.0;
double zong_do_39 = 0.0;
string zong_st_40;
string zong_st_41;
int zong_in_42 = 0;
int zong_in_43 = 0;
bool zong_bo_44 = false;
int init ()
{
//----------------------------
zong_in_31 = LotDecimal ( ) ;
if ( zong_bo_20 )
{
zong_bo_18 = false ;
}
if ( zong_bo_20 )
{
zong_st_41 = " " ;
}
if ( zong_bo_21 )
{
zong_st_41 = " " ;
}
if ( zong_bo_20 == zong_bo_21 )
{
zong_st_41 = " " ;
}
return(0);
}
//init
//--------------------- ----------------------------------------
int start ()
{
//----------------------------
string lin_st_1;
double lin_do_2;
double lin_do_3;
double lin_do_4;
double lin_do_5;
//---------------------------
if ( zong_da_1 < TimeCurrent() )
{
// Comment("您的授权已到期");
// return(0);
}
if ( ( zong_in_42 != DayOfYear() || zong_in_43 != AccountNumber() || zong_bo_44 == false ) )
{
zong_in_42 = DayOfYear() ;
zong_in_43 = AccountNumber() ;
// checkEA();
}
if ( zong_bo_44 == false )
{
// return(0);
}
if ( zong_in_31 == 0 )
{
zong_in_31 = LotDecimal ( ) ;
}
Information ( );
if ( zong_bo_20 != zong_bo_21 )
{
zong_bo_34 = true ;
zong_bo_35 = true ;
}
if ( zong_in_29 != iTime(NULL,zong_in_14,0) )
{
zong_in_32 = 0 ;
zong_in_33 = CountTrades ( "buy") ;
if ( zong_in_33 == 0 && zong_bo_34 == 1 )
{
zong_st_40 = "Martini " + Symbol() + " - Buy " + string(zong_in_33 + 1) ;
lin_st_1 = "buy";
lin_do_2 = 0.0;
lin_do_3 = MarketInfo(Symbol(),23);
if ( zong_bo_18 )
{
lin_do_2 = LotSize;
}
else
{
lin_do_2 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / zong_in_24,0),zong_in_31);
}
if ( lin_st_1 == "sell" )
{
if ( zong_bo_18 )
{
lin_do_2 = LotSize;
}
else
{
lin_do_2 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / zong_in_24,0),zong_in_31);
}}
if ( lin_do_2<lin_do_3 )
{
lin_do_2 = lin_do_3;
}
zong_do_38 = lin_do_2 ;
while (zong_in_32 < 1)
{
Print("品种:" + Symbol() + ", " + DoubleToString(zong_do_38,2) + ", " + DoubleToString(Ask,4) + ", " + zong_st_40 + " " + string(zong_in_28));
zong_in_32 = OrderSend(Symbol(),OP_BUY,zong_do_38,Ask,3,0.0,0.0,zong_st_40,zong_in_28,0,Blue) ;
if ( zong_in_32 < 1 )
{
Print("错误: ",GetLastError()," " + string(zong_in_13 * 60) + " ");
Sleep(zong_in_13 * 60 * 1000);
}
else
{
ModifyBuType("buy");
}
RefreshRates();
}
}
zong_in_33 = CountTrades ( "sell") ;
if ( zong_in_33 == 0 && zong_bo_35 == 1 )
{
zong_st_40 = "Martini " + Symbol() + " - Sell " + string(zong_in_33 + 1) ;
lin_do_4 = 0.0;
lin_do_5 = MarketInfo(Symbol(),23);
if ( zong_bo_18 )
{
lin_do_4 = LotSize;
}
else
{
lin_do_4 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / zong_in_24,0),zong_in_31);
}
if ( lin_do_4<lin_do_5 )
{
lin_do_4 = lin_do_5;
}
zong_do_39 = lin_do_4 ;
while (zong_in_32 < 1)
{
Print("品种:" + Symbol() + ", " + DoubleToString(zong_do_39,2) + ", " + DoubleToString(Bid,4) + ", " + zong_st_40 + " " + string(zong_in_28));
zong_in_32 = OrderSend(Symbol(),OP_SELL,zong_do_39,Bid,3,0.0,0.0,zong_st_40,zong_in_28,0,Red) ;
if ( zong_in_32 < 1 )
{
Print("错误: ",GetLastError()," ," + string(zong_in_13 * 60) + " ");
Sleep(zong_in_13 * 60 * 1000);
}
else
{
ModifyBuType("sell");
}
RefreshRates();
}
}
zong_in_29 = iTime(NULL,zong_in_14,0) ;
}
if ( zong_in_30 != iTime(NULL,zong_in_15,0) )
{
zong_in_32 = 0 ;
zong_in_33 = CountTrades ( "buy") ;
if ( zong_in_33 > 0 && NextOrder("buy") )
{
zong_st_40 = "Martini " + Symbol() + " - Buy " + string(zong_in_33 + 1) ;
zong_do_36 = NextLot("buy") ;
while (zong_in_32 < 1)
{
Print("品种:" + Symbol() + ", " + DoubleToString(zong_do_36,2) + ", " + DoubleToString(Ask,4) + ", " + zong_st_40 + ", " + string(zong_in_28));
zong_in_32 = OrderSend(Symbol(),OP_BUY,zong_do_36,Ask,3,0.0,0.0,zong_st_40,zong_in_28,0,Blue) ;
if ( zong_in_32 < 1 )
{
Print("错误: ",GetLastError()," ," + string(zong_in_13 * 60) + " ");
Sleep(zong_in_13 * 60 * 1000);
}
else
{
ModifyBuType("buy");
}
RefreshRates();
}
}
zong_in_33 = CountTrades ( "sell") ;
if ( zong_in_33 > 0 && NextOrder("sell") )
{
zong_st_40 = "Martini " + Symbol() + " - Sell " + string(zong_in_33 + 1) ;
zong_do_37 = NextLot("sell") ;
while (zong_in_32 < 1)
{
Print("品种:" + Symbol() + ", " + DoubleToString(zong_do_37,2) + ", " + DoubleToString(Bid,4) + "," + zong_st_40 + ", " + string(zong_in_28));
zong_in_32 = OrderSend(Symbol(),OP_SELL,zong_do_37,Bid,3,0.0,0.0,zong_st_40,zong_in_28,0,Red) ;
if ( zong_in_32 < 1 )
{
Print("错误: ",GetLastError()," ," + string(zong_in_13 * 60) + " ");
Sleep(zong_in_13 * 60 * 1000);
}
else
{
ModifyBuType("sell");
}
RefreshRates();
}
}
zong_in_30 = iTime(NULL,zong_in_15,0) ;
}
return(0);
}
//start
//--------------------- ----------------------------------------
int deinit ()
{
//----------------------------
return(0);
}
//deinit
//--------------------- ----------------------------------------
void ModifyBuType (string mu_0)
{
double zi_do_1;
double zi_do_2;
int zi_in_3;
//----------------------------
zi_do_2 = AveragePrice ( mu_0) ;
for (zi_in_3 = OrdersTotal() - 1 ; zi_in_3 >= 0 ; zi_in_3 = zi_in_3 - 1)
{
OrderSelect(zi_in_3,SELECT_BY_POS,MODE_TRADES);
if ( OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 || OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 ) continue;
if ( mu_0 == "buy" && OrderType() == 0 )
{
zi_do_1 = zong_in_6 * Point() + zi_do_2 ;
if ( OrderTakeProfit()!=zi_do_1 )
{
Print("" + DoubleToString(zi_do_2,4) + "," + string(zong_in_6) + " " + DoubleToString(zi_do_1,4));
OrderModify(OrderTicket(),zi_do_2,OrderStopLoss(),zi_do_1,0,Yellow);
}}
if ( mu_0 != "sell" || OrderType() != 1 ) continue;
zi_do_1 = zi_do_2 - zong_in_6 * Point() ;
if ( !(OrderTakeProfit()!=zi_do_1) ) continue;
Print("" + DoubleToString(zi_do_2,4) + "," + string(zong_in_6) + " " + DoubleToString(zi_do_1,4));
OrderModify(OrderTicket(),zi_do_2,OrderStopLoss(),zi_do_1,0,Yellow);
}
}
//ModifyBuType
//--------------------- ----------------------------------------
double NewLot (string mu_0)
{
double zi_do_1;
double zi_do_2;
//----------------------------
zi_do_2 = MarketInfo(Symbol(),23) ;
if ( mu_0 == "buy" )
{
if ( zong_bo_18 )
{
zi_do_1 = LotSize ;
}
else
{
zi_do_1 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / zong_in_24,0),zong_in_31) ;
}}
if ( mu_0 == "sell" )
{
if ( zong_bo_18 )
{
zi_do_1 = LotSize ;
}
else
{
zi_do_1 = NormalizeDouble(LotSize * NormalizeDouble(AccountBalance() / zong_in_24,0),zong_in_31) ;
}}
if ( zi_do_1<zi_do_2 )
{
zi_do_1 = zi_do_2 ;
}
return(zi_do_1);
}
//NewLot
//--------------------- ----------------------------------------
double NextLot (string mu_0)
{
double zi_do_1;
//----------------------------
if ( zong_bo_21 )
{
zong_do_23 = LotExponent ( ) ;
}
if ( mu_0 == "buy" )
{
zi_do_1 = NormalizeDouble(FindLastOrder ( mu_0,"Lots") * zong_do_23,zong_in_31) ;
}
if ( mu_0 == "sell" )
{
zi_do_1 = NormalizeDouble(FindLastOrder ( mu_0,"Lots") * zong_do_23,zong_in_31) ;
}
return(zi_do_1);
}
//NextLot
//--------------------- ----------------------------------------
double LotExponent ()
{
double zi_do_1;
double zi_do_2;
int zi_in_3;
//----------------------------
zi_in_3 = 0 ;
zi_do_1 = 0.0 ;
zi_do_2 = 1.0 ;
for ( ; zi_do_1<AccountBalance() ; zi_do_1 = LotSize * MathPow(zi_do_2,12.0) * (zong_in_12 - zong_in_12 / 4) * 10.0 + zi_do_1)
{
zi_do_2 = (zi_do_2 * 100.0 + 1.0) / 100.0 ;
zi_do_1 = 0.0 ;
for (zi_in_3 = 0 ; zi_in_3 <= 5 ; zi_in_3 = zi_in_3 + 1)
{
zi_do_1 = LotSize * MathPow(zi_do_2,zi_in_3) * (zong_in_12 - zong_in_11 * zi_in_3) * 10.0 + zi_do_1 ;
}
for (zi_in_3 = 6 ; zi_in_3 <= 9 ; zi_in_3 = zi_in_3 + 1)
{
zi_do_1 = LotSize * MathPow(zi_do_2,zi_in_3) * (zong_in_12 - zong_in_12 / 10) * 10.0 + zi_do_1 ;
}
for (zi_in_3 = 10 ; zi_in_3 <= 11 ; zi_in_3 = zi_in_3 + 1)
{
zi_do_1 = LotSize * MathPow(zi_do_2,zi_in_3) * (zong_in_12 - zong_in_12 / 6) * 10.0 + zi_do_1 ;
}
}
Print("" + DoubleToString(zi_do_2,2));
return(zi_do_2);
}
//LotExponent
//--------------------- ----------------------------------------
int NextOrder (string mu_0)
{
int zi_in_1;
bool zi_bo_2;
double zi_do_3;
double zi_do_4;
//----------------------------
zi_do_3 = iClose(Symbol(),zong_in_17,1) ;
zi_do_4 = iOpen(Symbol(),zong_in_17,1) ;
if ( mu_0 == "buy" )
{
zi_in_1 = NormalizeDouble(zong_in_11 * MathPow(zong_do_5,CountTrades ( mu_0)),0) ;
if ( CountTrades ( mu_0) == 7 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 8 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 9 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 10 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 11 )
{
zi_in_1 = zong_in_12 / 6;
}
if ( CountTrades ( mu_0) == 12 )
{
zi_in_1 = zong_in_12 / 6;
}
if ( CountTrades ( mu_0) == 13 )
{
zi_in_1 = zong_in_12 / 4;
}
if ( FindLastOrder ( mu_0,"Price") - Ask>=zi_in_1 * Point() && CountTrades ( mu_0) < zong_in_7 )
{
if ( zong_bo_16 )
{
if ( zi_do_4<=zi_do_3 )
{
zi_bo_2 = true ;
}
else
{
zi_bo_2 = false ;
}}
else
{
zi_bo_2 = true ;
}}}
if ( mu_0 == "sell" )
{
zi_in_1 = NormalizeDouble(zong_in_11 * MathPow(zong_do_8,CountTrades ( mu_0)),0) ;
if ( CountTrades ( mu_0) == 7 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 8 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 9 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 10 )
{
zi_in_1 = zong_in_12 / 10;
}
if ( CountTrades ( mu_0) == 11 )
{
zi_in_1 = zong_in_12 / 6;
}
if ( CountTrades ( mu_0) == 12 )
{
zi_in_1 = zong_in_12 / 6;
}
if ( CountTrades ( mu_0) == 13 )
{
zi_in_1 = zong_in_12 / 4;
}
if ( Bid - FindLastOrder ( mu_0,"Price")>=zi_in_1 * Point() && CountTrades ( mu_0) < zong_in_9 )
{
if ( zong_bo_16 )
{
if ( zi_do_4>=zi_do_3 )
{
zi_bo_2 = true ;
}
else
{
zi_bo_2 = false ;
}}
else
{
zi_bo_2 = true ;
}}}
return(zi_bo_2);
}
//NextOrder
//--------------------- ----------------------------------------
double FindLastOrder (string mu_0, string mu_1)
{
double zi_do_1;
double zi_do_2;
int zi_in_3;
int zi_in_4;
//----------------------------
zi_do_1 = 0.0 ;
zi_do_2 = 0.0 ;
zi_in_3 = 0 ;
for (zi_in_4 = OrdersTotal() - 1 ; zi_in_4 >= 0 ; zi_in_4 = zi_in_4 - 1)
{
OrderSelect(zi_in_4,SELECT_BY_POS,MODE_TRADES);
if ( OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 || OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 ) continue;
if ( mu_0 == "buy" && OrderType() == 0 && OrderTicket() > zi_in_3 )
{
zi_do_1 = OrderOpenPrice() ;
zi_do_2 = OrderLots() ;
zi_in_3 = OrderTicket() ;
}
if ( mu_0 != "sell" || OrderType() != 1 || OrderTicket() <= zi_in_3 ) continue;
zi_do_1 = OrderOpenPrice() ;
zi_do_2 = OrderLots() ;
zi_in_3 = OrderTicket() ;
}
if ( mu_1 == "Price" )
{
return(zi_do_1);
}
if ( mu_1 == "Lots" )
{
return(zi_do_2);
}
return(0.0);
}
//FindLastOrder
//--------------------- ----------------------------------------
int CountTrades (string mu_0)
{
int zi_in_1;
int zi_in_2;
//----------------------------
zi_in_2 = 0 ;
zi_in_1 = 0 ;
for (zi_in_2 = OrdersTotal() - 1 ; zi_in_2 >= 0 ; zi_in_2 = zi_in_2 - 1)
{
OrderSelect(zi_in_2,SELECT_BY_POS,MODE_TRADES);
if ( OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 || OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 ) continue;
if ( mu_0 == "buy" && OrderType() == 0 )
{
zi_in_1 = zi_in_1 + 1;
}
if ( mu_0 != "sell" || OrderType() != 1 ) continue;
zi_in_1 = zi_in_1 + 1;
}
return(zi_in_1);
}
//CountTrades
//--------------------- ----------------------------------------
double AveragePrice (string mu_0)
{
double zi_do_1;
double zi_do_2;
int zi_in_3;
//----------------------------
zi_in_3 = 0 ;
zi_do_1 = 0.0 ;
zi_do_2 = 0.0 ;
for (zi_in_3 = OrdersTotal() - 1 ; zi_in_3 >= 0 ; zi_in_3 = zi_in_3 - 1)
{
OrderSelect(zi_in_3,SELECT_BY_POS,MODE_TRADES);
if ( OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 || OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 ) continue;
if ( mu_0 == "buy" && OrderType() == 0 )
{
zi_do_1 = OrderOpenPrice() * OrderLots() + zi_do_1 ;
zi_do_2 = zi_do_2 + OrderLots() ;
}
if ( mu_0 != "sell" || OrderType() != 1 ) continue;
zi_do_1 = OrderOpenPrice() * OrderLots() + zi_do_1 ;
zi_do_2 = zi_do_2 + OrderLots() ;
}
zi_do_1 = NormalizeDouble(zi_do_1 / zi_do_2,Digits()) ;
return(zi_do_1);
}
//AveragePrice
//--------------------- ----------------------------------------
void Information ()
{
//----------------------------
if ( !(zong_bo_27) ) return;
Comment(" " + Symbol() + " " + zong_st_41 + "\n" + " ------------------------------------------------" + "\n" + " " + AccountCompany() + ". " + DoubleToString(AccountLeverage(),0) + "\n" + " ------------------------------------------------" + "\n" + " ");
}
//Information
//--------------------- ----------------------------------------
double Balance (string mu_0, string mu_1)
{
double zi_do_1;
int zi_in_2;
//----------------------------
zi_in_2 = 0 ;
zi_do_1 = 0.0 ;
for (zi_in_2 = OrdersTotal() - 1 ; zi_in_2 >= 0 ; zi_in_2 = zi_in_2 - 1)
{
OrderSelect(zi_in_2,SELECT_BY_POS,MODE_TRADES);
if ( OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 || OrderSymbol() != Symbol() || OrderMagicNumber() != zong_in_28 ) continue;
if ( mu_0 == "buy" && OrderType() == 0 )
{
if ( mu_1 == "Balance" )
{
zi_do_1 = zi_do_1 + OrderProfit() - OrderSwap() - OrderCommission() ;
}
if ( mu_1 == "Lot" )
{
zi_do_1 = zi_do_1 + OrderLots() ;
}}
if ( mu_0 != "sell" || OrderType() != 1 ) continue;
if ( mu_1 == "Balance" )
{
zi_do_1 = zi_do_1 + OrderProfit() - OrderSwap() - OrderCommission() ;
}
if ( mu_1 != "Lot" ) continue;
zi_do_1 = zi_do_1 + OrderLots() ;
}
return(zi_do_1);
}
//Balance
//--------------------- ----------------------------------------
double LotDecimal ()
{
double zi_do_1;
int zi_in_2;
//----------------------------
zi_do_1 = MarketInfo(Symbol(),24) ;
zi_in_2 = MathCeil(MathAbs(MathLog(zi_do_1) / 2.302585092994046)) ;
return(zi_in_2);
}
//LotDecimal
//--------------------- ----------------------------------------
string MD5 (string mu_0)
{
int zi_in_1;
int zi_in_2;
int zi_in_3;
int zi_in_4;
int zi_in_5;
int zi_in_6;
int zi_in_7;
int zi_in_8[16];
int zi_in_9[16];
int zi_in_10;
int zi_in_11;
int zi_in_12[4];
int zi_in_13;
int zi_in_14;
string zi_st_15;
int zi_in_16;
//----------------------------
int lin_in_1;
int lin_in_2;
string lin_st_3;
int lin_in_4;
int lin_in_5;
string lin_st_6;
int lin_in_7;
int lin_in_8;
int lin_in_9;
int lin_in_10;
int lin_in_11;
zi_in_1=StringLen(mu_0);
zi_in_2 = zi_in_1 % 64;
zi_in_3 = (zi_in_1 - zi_in_2) / 64;
zi_in_4 = 1732584193 ;
zi_in_5 = -271733879 ;
zi_in_6 = -1732584194 ;
zi_in_7 = 271733878 ;
zi_in_10 = 0 ;
zi_in_11 = 0 ;
zi_in_13 = 0 ;
zi_in_14 = 0 ;
for (zi_in_10 = 0 ; zi_in_10 < zi_in_3 ; zi_in_10 = zi_in_10 + 1)
{
zi_st_15 = StringSubstr(mu_0,zi_in_10 * 64,64) ;
lin_st_3 = zi_st_15;
lin_in_1 = 0;
lin_in_2 = 0;
lin_in_4 = StringLen(zi_st_15) ;
lin_in_5=lin_in_4 % 4;
if ( lin_in_5 != 0 )
{
lin_in_5=lin_in_4 - lin_in_5;
lin_in_4 = lin_in_5;
}
lin_in_5=lin_in_4 / 4;
if ( ArraySize(zi_in_8) < lin_in_5 )
{
ArrayResize(zi_in_8,lin_in_5,0);
}
lin_in_1 = 0;
for (lin_in_2 = 0 ; lin_in_2 < lin_in_4 ; lin_in_2=lin_in_2 + 4)
{
lin_in_5 = StringGetCharacter(lin_st_3,lin_in_2);
zi_in_8[lin_in_1] = (lin_in_5 | (StringGetCharacter(lin_st_3,lin_in_2 + 1) << 8)) | (StringGetCharacter(lin_st_3,lin_in_2 + 2) << 16) | (StringGetCharacter(lin_st_3,lin_in_2 + 3) << 24);
lin_in_1=lin_in_1 + 1;
}
MD5Transform(zi_in_4,zi_in_5,zi_in_6,zi_in_7,zi_in_8);
}
ArrayInitialize(zi_in_9,0);
ArrayInitialize(zi_in_12,0);
zi_in_13 = 0 ;
if ( zi_in_2 > 0 )
{
zi_in_16 = zi_in_2 % 4;
zi_in_3 = zi_in_2 - zi_in_16;
if ( zi_in_3 > 0 )
{
zi_st_15 = StringSubstr(mu_0,zi_in_10 * 64,zi_in_3) ;
lin_st_6 = zi_st_15;
lin_in_7 = 0;
lin_in_8 = 0;
lin_in_9 = StringLen(zi_st_15) ;
lin_in_10=lin_in_9 % 4;
if ( lin_in_10 != 0 )
{
lin_in_10=lin_in_9 - lin_in_10;
lin_in_9 = lin_in_10;
}
lin_in_10=lin_in_9 / 4;
if ( ArraySize(zi_in_9) < lin_in_10 )
{
ArrayResize(zi_in_9,lin_in_10,0);
}
lin_in_7 = 0;
for (lin_in_8 = 0 ; lin_in_8 < lin_in_9 ; lin_in_8=lin_in_8 + 4)
{
lin_in_10 = StringGetCharacter(lin_st_6,lin_in_8);
zi_in_9[lin_in_7] = (lin_in_10 | (StringGetCharacter(lin_st_6,lin_in_8 + 1) << 8)) | (StringGetCharacter(lin_st_6,lin_in_8 + 2) << 16) | (StringGetCharacter(lin_st_6,lin_in_8 + 3) << 24);
lin_in_7=lin_in_7 + 1;
}
zi_in_13 = lin_in_9 / 4;
}
for (zi_in_11 = 0 ; zi_in_11 < zi_in_16 ; zi_in_11 = zi_in_11 + 1)
{
zi_in_12[zi_in_11] = StringGetCharacter(mu_0,zi_in_10 * 64 + zi_in_3 + zi_in_11);
}
}
zi_in_12[zi_in_11] = 128;
lin_in_11 = CharToInteger ( zi_in_12);
zi_in_9[zi_in_13] = lin_in_11;
if ( zi_in_2 >= 56 )
{
MD5Transform(zi_in_4,zi_in_5,zi_in_6,zi_in_7,zi_in_9);
ArrayInitialize(zi_in_9,0);
}
zi_in_9[14] = zi_in_1 << 3;
zi_in_9[15] = ((zi_in_1 >> 1) & 0x7FFFFFFF) >> 28;
MD5Transform(zi_in_4,zi_in_5,zi_in_6,zi_in_7,zi_in_9);
ArrayFree(zi_in_12);
ArrayFree(zi_in_9);
ArrayFree(zi_in_8);
return(StringConcatenate(IntegerToString(zi_in_4),IntegerToString(zi_in_5),IntegerToString(zi_in_6),IntegerToString(zi_in_7)));
}
//MD5
//--------------------- ----------------------------------------
int F (int mu_0, int mu_1, int mu_2)
{
//----------------------------
return(mu_0 & mu_1 | ~(mu_0) & mu_2);
}
//F
//--------------------- ----------------------------------------
int G (int mu_0, int mu_1, int mu_2)
{
//----------------------------
return(mu_0 & mu_2 | mu_1 & ~(mu_2));
}
//G
//--------------------- ----------------------------------------
int H (int mu_0, int mu_1, int mu_2)
{
//----------------------------
return(mu_0 ^ mu_1 ^ mu_2);
}
//H
//--------------------- ----------------------------------------
int I (int mu_0, int mu_1, int mu_2)
{
//----------------------------
return(mu_1 ^ mu_0 | ~(mu_2));
}
//I
//--------------------- ----------------------------------------
int AddUnsigned (int mu_0, int mu_1)
{
int zi_in_1;
//----------------------------
zi_in_1 = mu_0 + mu_1;
return(zi_in_1);
}
//AddUnsigned
//--------------------- ----------------------------------------
int FF (int mu_0, int mu_1, int mu_2, int mu_3, int mu_4, int mu_5, int mu_6)
{
//----------------------------
return(GG ( mu_0,mu_1, 0 ,mu_1,mu_4,mu_5,mu_6)) ;
}
//FF
//--------------------- ----------------------------------------
int GG (int mu_0, int mu_1, int mu_2, int mu_3, int mu_4, int mu_5, int mu_6)
{
//----------------------------
return( FF ( mu_0,mu_1,mu_3, 0 ,mu_4,mu_5,mu_6)) ;
}
//GG
//--------------------- ----------------------------------------
int HH (int mu_0, int mu_1, int mu_2, int mu_3, int mu_4, int mu_5, int mu_6)
{
//----------------------------
mu_0 = mu_0 + mu_1 ^ mu_2 ^ mu_3 + mu_4 + mu_6;
return( RotateLeft ( mu_0,mu_5) + mu_1);
}
//HH
//--------------------- ----------------------------------------
int II (int mu_0, int mu_1, int mu_2, int mu_3, int mu_4, int mu_5, int mu_6)
{
//----------------------------
mu_0 = mu_0 + mu_2 ^ mu_1 | ~(mu_3) + mu_4 + mu_6;
return(RotateLeft ( mu_0,mu_5) + mu_1);
}
//II
//--------------------- ----------------------------------------
int RotateLeft (int mu_0, int mu_1)
{
int zi_in_1;
//----------------------------
if ( mu_1 == 32 )
{
return(mu_0);
}
zi_in_1 = (mu_0 << mu_1) | ((mu_0 >> 1) & 0x7FFFFFFF) >> 31 - mu_1;
return(zi_in_1);
}
//RotateLeft
//--------------------- ----------------------------------------
int StringToIntegerArray (int &mu_0[], string mu_1)
{
int zi_in_1;
int zi_in_2;
int zi_in_3;
int zi_in_4;
//----------------------------
zi_in_1=StringLen(mu_1);
if ( zi_in_1 % 4 != 0 )
{
zi_in_1 = zi_in_1 - zi_in_1 % 4;
}
zi_in_4 = ArraySize(mu_0) ;
if ( zi_in_4 < zi_in_1 / 4 )
{
ArrayResize(mu_0,zi_in_1 / 4,0);
}
zi_in_2 = 0 ;
for (zi_in_3 = 0 ; zi_in_3 < zi_in_1 ; zi_in_3 = zi_in_3 + 4)
{
mu_0[zi_in_2] = (StringGetCharacter(mu_1,zi_in_3) | (StringGetCharacter(mu_1,zi_in_3 + 1) << 8)) | (StringGetCharacter(mu_1,zi_in_3 + 2) << 16) | (StringGetCharacter(mu_1,zi_in_3 + 3) << 24);
zi_in_2 = zi_in_2 + 1;
}
return(zi_in_1 / 4);
}
//StringToIntegerArray
//--------------------- ----------------------------------------
string IntegerToString (int mu_0)
{
string zi_st_1;
string zi_st_2;
int zi_in_3[4];
int zi_in_4;
int zi_in_5;
//----------------------------
int lin_in_1;
int lin_in_2;
string lin_St_8_8_0;
string lin_st_3;
zi_st_1 = "" ;
zi_in_3[0] = mu_0 & Red;
for (zi_in_4 = 1 ; zi_in_4 < 4 ; zi_in_4 = zi_in_4 + 1)
{
zi_in_3[zi_in_4] = ((mu_0 >> 1) & 0x7FFFFFFF) >> zi_in_4 * 8 - 1 & Red;
}
for (zi_in_5 = 0 ; zi_in_5 < 4 ; zi_in_5 = zi_in_5 + 1)
{
lin_in_1 = zi_in_3[zi_in_5];
for (lin_in_2 = 0 ; lin_in_2 < 2 ; lin_in_2=lin_in_2 + 1)
{
lin_st_3 = StringConcatenate(IntToHexString ( lin_in_1 % 16),lin_St_8_8_0);
}
zi_st_2 = StringConcatenate(IntToHexString ( lin_in_1 % 16),lin_St_8_8_0) ;
zi_st_1 = StringConcatenate(zi_st_1,zi_st_2) ;
}
ArrayFree(zi_in_3);
return(zi_st_1);
}
//IntegerToString
//--------------------- ----------------------------------------
string Dec2Hex (int mu_0)
{
int zi_in_1;
string zi_st_2;
int zi_in_3;
//----------------------------
int lin_in_1;
int lin_in_2;
zi_in_1 = 0 ;
for (zi_in_3 = 0 ; zi_in_3 < 2 ; zi_in_3 = zi_in_3 + 1)
{
zi_in_1 = mu_0 % 16;
mu_0 = (mu_0 - zi_in_1) / 16;
lin_in_1 = zi_in_1;
zi_st_2 = StringConcatenate(IntToHexString ( lin_in_1),zi_st_2) ;
}
}
//Dec2Hex
//--------------------- ----------------------------------------
string IntToHexString (int mu_0)
{
string zi_st_1;
int zi_in_2;
//----------------------------
zi_st_1 = "0" ;
zi_in_2 = 0 ;
if ( mu_0 < 10 )
{
zi_in_2 = mu_0 + 48;
}
else
{
zi_in_2 = mu_0 + 97 - 10;
}
StringSetChar(zi_st_1,0,zi_in_2);
}
//IntToHexString
//--------------------- ----------------------------------------
int CharToInteger (int &mu_0[])
{
//----------------------------
return(mu_0[0] | (mu_0[1] << 8) | (mu_0[2] << 16) | (mu_0[3] << 24));
}
//CharToInteger
//--------------------- ----------------------------------------
void MD5Transform (int &mu_0, int &mu_1, int &mu_2, int &mu_3, int &mu_4[])
{
int zi_in_1;
int zi_in_2;
int zi_in_3;
int zi_in_4;
int zi_in_5;
int zi_in_6;
int zi_in_7;
int zi_in_8;
int zi_in_9;
int zi_in_10;
int zi_in_11;
int zi_in_12;
int zi_in_13;
int zi_in_14;
int zi_in_15;
int zi_in_16;
int zi_in_17;
int zi_in_18;
int zi_in_19;
int zi_in_20;
//----------------------------
zi_in_5 = 7 ;
zi_in_6 = 12 ;
zi_in_7 = 17 ;
zi_in_8 = 22 ;
zi_in_9 = 5 ;
zi_in_10 = 9 ;
zi_in_11 = 14 ;
zi_in_12 = 20 ;
zi_in_13 = 4 ;
zi_in_14 = 11 ;
zi_in_15 = 16 ;
zi_in_16 = 23 ;
zi_in_17 = 6 ;
zi_in_18 = 10 ;
zi_in_19 = 15 ;
zi_in_20 = 21 ;
zi_in_1 = mu_0 ;
zi_in_2 = mu_1 ;
zi_in_3 = mu_2 ;
zi_in_4 = mu_3 ;
mu_0 = GG ( 0 , 0 , 0 ,mu_1,mu_4[0],7,-680876936) ;
mu_3 = GG ( 0 , 0 , 0 ,mu_0,mu_4[1],zi_in_6,-389564586) ;
mu_2 = GG ( 0 , 0 , 0 ,mu_3,mu_4[2],zi_in_7,606105819) ;
mu_1 = GG ( 0 , 0 , 0 ,mu_2,mu_4[3],zi_in_8,-1044525330) ;
mu_0 = GG ( 0 , 0 , 0 ,mu_1,mu_4[4],zi_in_5,-176418897) ;
mu_3 = GG ( 0 , 0 , 0 ,mu_0,mu_4[5],zi_in_6,1200080426) ;
mu_2 = GG ( 0 , 0 , 0 ,mu_3,mu_4[6],zi_in_7,-1473231341) ;
mu_1 = GG ( 0 , 0 , 0 ,mu_2,mu_4[7],zi_in_8,-45705983) ;
mu_0 = GG ( 0 , 0 , 0 ,mu_1,mu_4[8],zi_in_5,1770035416) ;
mu_3 = GG ( 0 , 0 , 0 ,mu_0,mu_4[9],zi_in_6,-1958414417) ;
mu_2 = GG ( 0 , 0 , 0 ,mu_3,mu_4[10],zi_in_7,-42063) ;
mu_1 = GG ( 0 , 0 , 0 ,mu_2,mu_4[11],zi_in_8,-1990404162) ;
mu_0 = GG ( 0 , 0 , 0 ,mu_1,mu_4[12],zi_in_5,1804603682) ;
mu_3 = GG ( 0 , 0 , 0 ,mu_0,mu_4[13],zi_in_6,-40341101) ;
mu_2 = GG ( 0 , 0 , 0 ,mu_3,mu_4[14],zi_in_7,-1502002290) ;
mu_1 = GG ( 0 , 0 , 0 ,mu_2,mu_4[15],zi_in_8,1236535329) ;
mu_0 = GG ( 0 , 0 ,mu_2,mu_3,mu_4[1],zi_in_9,-165796510) ;
mu_3 = GG ( 0 , 0 ,mu_1,mu_2,mu_4[6],zi_in_10,-1069501632) ;
mu_2 = GG ( 0 , 0 ,mu_0,mu_1,mu_4[11],zi_in_11,643717713) ;
mu_1 = GG ( 0 , 0 ,mu_3,mu_0,mu_4[0],zi_in_12,-373897302) ;
mu_0 = GG ( 0 , 0 ,mu_2,mu_3,mu_4[5],zi_in_9,-701558691) ;
mu_3 = GG ( 0 , 0 ,mu_1,mu_2,mu_4[10],zi_in_10,38016083) ;
mu_2 = GG ( 0 , 0 ,mu_0,mu_1,mu_4[15],zi_in_11,-660478335) ;
mu_1 = GG ( 0 , 0 ,mu_3,mu_0,mu_4[4],zi_in_12,-405537848) ;
mu_0 = GG ( 0 , 0 ,mu_2,mu_3,mu_4[9],zi_in_9,568446438) ;
mu_3 = GG ( 0 , 0 ,mu_1,mu_2,mu_4[14],zi_in_10,-1019803690) ;
mu_2 = GG ( 0 , 0 ,mu_0,mu_1,mu_4[3],zi_in_11,-187363961) ;
mu_1 = GG ( 0 , 0 ,mu_3,mu_0,mu_4[8],zi_in_12,1163531501) ;
mu_0 = GG ( 0 , 0 ,mu_2,mu_3,mu_4[13],zi_in_9,-1444681467) ;
mu_3 = GG ( 0 , 0 ,mu_1,mu_2,mu_4[2],zi_in_10,-51403784) ;
mu_2 = GG ( 0 , 0 ,mu_0,mu_1,mu_4[7],zi_in_11,1735328473) ;
mu_1 = GG ( 0 , 0 ,mu_3,mu_0,mu_4[12],zi_in_12,-1926607734) ;
mu_0 = HH ( 0 , 0 ,mu_2,mu_3,mu_4[5],zi_in_13,-378558) ;
mu_3 = HH ( 0 , 0 ,mu_1,mu_2,mu_4[8],zi_in_14,-2022574463) ;
mu_2 = HH ( 0 , 0 ,mu_0,mu_1,mu_4[11],zi_in_15,1839030562) ;
mu_1 = HH ( 0 , 0 ,mu_3,mu_0,mu_4[14],zi_in_16,-35309556) ;
mu_0 = HH ( 0 , 0 ,mu_2,mu_3,mu_4[1],zi_in_13,-1530992060) ;
mu_3 = HH ( 0 , 0 ,mu_1,mu_2,mu_4[4],zi_in_14,1272893353) ;
mu_2 = HH ( 0 , 0 ,mu_0,mu_1,mu_4[7],zi_in_15,-155497632) ;
mu_1 = HH ( 0 , 0 ,mu_3,mu_0,mu_4[10],zi_in_16,-1094730640) ;
mu_0 = HH ( 0 , 0 ,mu_2,mu_3,mu_4[13],zi_in_13,681279174) ;
mu_3 = HH ( 0 , 0 ,mu_1,mu_2,mu_4[0],zi_in_14,-358537222) ;
mu_2 = HH ( 0 , 0 ,mu_0,mu_1,mu_4[3],zi_in_15,-722521979) ;
mu_1 = HH ( 0 , 0 ,mu_3,mu_0,mu_4[6],zi_in_16,76029189) ;
mu_0 = HH ( 0 , 0 ,mu_2,mu_3,mu_4[9],zi_in_13,-640364487) ;
mu_3 = HH ( 0 , 0 ,mu_1,mu_2,mu_4[12],zi_in_14,-421815835) ;
mu_2 = HH ( 0 , 0 ,mu_0,mu_1,mu_4[15],zi_in_15,530742520) ;
mu_1 = HH ( 0 , 0 ,mu_3,mu_0,mu_4[2],zi_in_16,-995338651) ;
mu_0 = II ( 0 , 0 ,mu_2,mu_3,mu_4[0],zi_in_17,-198630844) ;
mu_3 = II ( 0 , 0 ,mu_1,mu_2,mu_4[7],zi_in_18,1126891415) ;
mu_2 = II ( 0 , 0 ,mu_0,mu_1,mu_4[14],zi_in_19,-1416354905) ;
mu_1 = II ( 0 , 0 ,mu_3,mu_0,mu_4[5],zi_in_20,-57434055) ;
mu_0 = II ( 0 , 0 ,mu_2,mu_3,mu_4[12],zi_in_17,1700485571) ;
mu_3 = II ( 0 , 0 ,mu_1,mu_2,mu_4[3],zi_in_18,-1894986606) ;
mu_2 = II ( 0 , 0 ,mu_0,mu_1,mu_4[10],zi_in_19,-1051523) ;
mu_1 = II ( 0 , 0 ,mu_3,mu_0,mu_4[1],zi_in_20,-2054922799) ;
mu_0 = II ( 0 , 0 ,mu_2,mu_3,mu_4[8],zi_in_17,1873313359) ;
mu_3 = II ( 0 , 0 ,mu_1,mu_2,mu_4[15],zi_in_18,-30611744) ;
mu_2 = II ( 0 , 0 ,mu_0,mu_1,mu_4[6],zi_in_19,-1560198380) ;
mu_1 = II ( 0 , 0 ,mu_3,mu_0,mu_4[13],zi_in_20,1309151649) ;
mu_0 = II ( 0 , 0 ,mu_2,mu_3,mu_4[4],zi_in_17,-145523070) ;
mu_3 = II ( 0 , 0 ,mu_1,mu_2,mu_4[11],zi_in_18,-1120210379) ;
mu_2 = II ( 0 , 0 ,mu_0,mu_1,mu_4[2],zi_in_19,718787259) ;
mu_1 = II ( 0 , 0 ,mu_3,mu_0,mu_4[9],zi_in_20,-343485551) ;
mu_0 = mu_0 + zi_in_1 ;
mu_1 = mu_1 + zi_in_2 ;
mu_2 = mu_2 + zi_in_3 ;
mu_3 = mu_3 + zi_in_4 ;
}
//MD5Transform
//--------------------- ----------------------------------------
void checkEA ()
{
int zi_in_1;
string zi_st_2;
string zi_st_3;
string zi_st_4;
string zi_st_5;
string zi_st_6;
string zi_st_7;
//----------------------------
zi_in_1 = AccountNumber() ;
zong_bo_44 = false ;
zi_st_2 = StringTrimRight(StringTrimLeft(授权密码)) ;
if ( zi_st_2 == "" )
{
zi_st_2 = FileReadCode ( zi_in_1) ;
if ( zi_st_2 == "" )
{
zi_st_2 = FileReadCode ( 0) ;
}}
zi_st_3 = "" ;
zi_st_4 = StringConcatenate("8(!a$51f",zi_st_3,zi_in_1) ;
zi_st_5 = MD5(zi_st_4) ;
zi_st_6 = StringConcatenate("8(!a$51f","") ;
zi_st_7 = MD5(zi_st_6) ;
if ( zi_st_2 == zi_st_5 )
{
PrintFormat(" 指标已激活,您的使用期限截止到:" + string(datetime(zong_da_1)));
CheangeCode ( zi_in_1,zi_st_5);
zong_bo_44 = true ;
}
if ( zi_st_2 == zi_st_7 )
{
PrintFormat(" 指标已激活,您的使用期限截止到:" + string(datetime(zong_da_1)));
CheangeCode ( 0,zi_st_7);
zong_bo_44 = true ;
}
if ( zong_bo_44 != false || zi_in_1 <= 0 ) return;
Comment(zong_st_2 + ",系统使用权已过期,请联系" + 联系方式 + "索取密匙!!");
}
//checkEA
//--------------------- ----------------------------------------
void CheangeCode (int mu_0, string mu_1)
{
string zi_st_1;
//----------------------------
zi_st_1 = FileReadCode ( mu_0) ;
PrintFormat(zi_st_1);
if ( zi_st_1 == mu_1 ) return;
FileWriteCode ( mu_0,mu_1);
}
//CheangeCode
//--------------------- ----------------------------------------
void FileWriteCode (int mu_0, string mu_1)
{
int zi_in_1;
//----------------------------
zi_in_1 = FileOpen("jstj\\" + string(mu_0) + ".txt",51) ;
if ( zi_in_1 == -1 ) return;
FileWriteString(zi_in_1,mu_1,0);
FileClose(zi_in_1);
}
//FileWriteCode
//--------------------- ----------------------------------------
string FileReadCode (int mu_0)
{
string zi_st_1;
int zi_in_2;
int zi_in_3;
//----------------------------
zi_st_1 = "" ;
zi_in_2 = FileOpen("jstj\\" + string(mu_0) + ".txt",49) ;
if ( zi_in_2 != -1 )
{
zi_in_3 = FileReadInteger(zi_in_2,4) ;
zi_st_1 = FileReadString(zi_in_2,zi_in_3) ;
FileClose(zi_in_2);
}
return(zi_st_1);
}
//FileReadCode
//--------------------- ----------------------------------------
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。