2 Star 5 Fork 4

航耍耍/mql4

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
横扫千军_源码.mq4 67.21 KB
一键复制 编辑 原始数据 按行查看 历史
航耍耍 提交于 2021-11-09 08:24 . 123123123123
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231

#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
//--------------------- ----------------------------------------
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/hangyejiadao_581/mql4.git
git@gitee.com:hangyejiadao_581/mql4.git
hangyejiadao_581
mql4
mql4
master

搜索帮助