📅 财经日历 📊 实时波动 📈 大盘云图 📶 行情走势 🆚 投机情绪 🚀 今日热点

    Synergy_TDI

    2016-04-29 · 7165 阅读
    QQ截图20160429152545.png


    1. /*
    2.    Generated by EX4-TO-MQ4 decompiler V4.0.220.2c []
    3.    Website: http://purebeam.biz
    4.    E-mail : purebeam@gmail.com
    5. */
    6. #property copyright "Copyright ?2008, Dean Malone"
    7. #property link      "www.compassfx.com"

    8. #property indicator_separate_window
    9. #property indicator_buffers 6
    10. #property indicator_color1 Black
    11. #property indicator_color2 MediumBlue
    12. #property indicator_color3 Yellow
    13. #property indicator_color4 MediumBlue
    14. #property indicator_color5 Green
    15. #property indicator_color6 Red
    16. /*
    17. #import "as2_updater.dll"
    18.    int isExeRunning();
    19.    int runAutoUpdater();
    20.    int isInstallerRunning();
    21.    int runAutoInstaller();
    22. #import "Synergy.dll"
    23.    string gGrab(string a0, string a1);
    24. #import
    25. */
    26. int gi_76 = -1;
    27. double gda_80[];
    28. double gda_84[10];
    29. string gsa_88[10];
    30. string gsa_92[10];
    31. int gi_96;
    32. extern string Custom_Indicator = "Traders Dynamic Index";
    33. extern string Copyright = "?2008, Dean Malone";
    34. extern string Web_Address = "www.compassfx.com";
    35. int gi_124 = 10;
    36. int gi_128 = PRICE_TYPICAL;
    37. extern string label = "--Login Information--";
    38. extern string EMail = "";
    39. extern string Password = "";
    40. extern string TDI_Fast = "Off";
    41. double gda_164[];
    42. double gda_168[];
    43. double gda_172[];
    44. double gda_176[];
    45. double gda_180[];
    46. double gda_184[];
    47. int gi_188;
    48. bool gi_192 = FALSE;
    49. string gs_196;
    50. bool gi_204 = FALSE;
    51. int gi_208;
    52. string gs_212;
    53. string gs_220;
    54. string gs_228;
    55. string gs_236;
    56. int gi_244;
    57. bool gi_248;
    58. int gi_252;
    59. int gi_256;
    60. int gi_260 = 80;
    61. string gs_264 = "http://www.synergyforex.com/server/server2/";
    62. string gs_272 = "http://www.compassfx.com/server/";
    63. string gs_280;
    64. int gi_288 = -1;

    65. int doLoginCheck(string as_0) {
    66.    double lda_16[10];
    67.    string lsa_20[10];
    68.    string ls_24;
    69.    bool li_8 = FALSE;
    70.    int li_12 = FileOpen("indicators_debug.txt", FILE_CSV|FILE_READ, ",");
    71.    if (li_12 != -1) {
    72.       if (FileSize(li_12) > 100000) {
    73.          FileClose(li_12);
    74.          FileDelete("indicators_debug.txt");
    75.       } else FileClose(li_12);
    76.    }
    77.    int li_44 = 0;
    78.    bool li_48 = FALSE;
    79.    ArrayInitialize(lda_16, 2.01);
    80.    fillGlobalBuffers(as_0);
    81.    int li_40 = openOutputFile();
    82.    lda_16[0] = iCustom(NULL, 0, "Synergy_TradeSignal", "verInfo_AS", 0, 0);
    83.    lsa_20[0] = "Synergy_TradeSignal";
    84.    lda_16[1] = iCustom(NULL, 0, "Synergy_Continuation", "verInfo_AS", 0, 0);
    85.    lsa_20[1] = "Synergy_Continuation";
    86.    lda_16[2] = iCustom(NULL, 0, "Synergy_Volatility", "verInfo_AS", 0, 0);
    87.    lsa_20[2] = "Synergy_Volatility";
    88.    lda_16[3] = iCustom(NULL, 0, "Synergy_DSR", "verInfo_AS", 0, 0);
    89.    lsa_20[3] = "Synergy_DSR";
    90.    lda_16[4] = iCustom(NULL, 0, "Synergy_TDI", "verInfo_AS", 0, 0);
    91.    lsa_20[4] = "Synergy_TDI";
    92.    lda_16[5] = iCustom(NULL, 0, "Synergy_HeikenAshi", "verInfo_AS", 0, 0);
    93.    lsa_20[5] = "Synergy_HeikenAshi";
    94.    lda_16[6] = iCustom(NULL, 0, "Synergy_RangeFactor", "verInfo_AS", 0, 0);
    95.    lsa_20[6] = "Synergy_RangeFactor";
    96.    lda_16[7] = iCustom(NULL, 0, "Synergy_MTF", "verInfo_AS", 0, 0);
    97.    lsa_20[7] = "Synergy_MTF";
    98.    lda_16[8] = iCustom(NULL, 0, "Synergy_TradeTargets", "verInfo_AS", 0, 0);
    99.    lsa_20[8] = "Synergy_TradeTargets";
    100.    for (int li_32 = 0; li_32 < gi_76; li_32++) {
    101.       for (int li_36 = 0; li_36 < 9; li_36++) {
    102.          if (gsa_88[li_32] == lsa_20[li_36]) {
    103.             li_8 = TRUE;
    104.             Print("Indicator : ", lsa_20[li_36], " Value : ", lda_16[li_36], " Latest Version : ", gda_84[li_32]);
    105.             if (lda_16[li_36] < gda_84[li_32]) {
    106.                gsa_92[li_44] = gsa_88[li_32];
    107.                li_44++;
    108.                if (MathAbs(lda_16[li_36] - gda_84[li_32]) >= 0.05) {
    109.                   li_48 = TRUE;
    110.                   if (!GlobalVariableCheck("rA_synergy")) GlobalVariableSet("rA_synergy", 1);
    111.                }
    112.             }
    113.          }
    114.       }
    115.       if (!li_8) {
    116.          gsa_92[li_44] = gsa_88[li_32];
    117.          li_44++;
    118.       }
    119.       li_8 = FALSE;
    120.    }
    121.    Print("-- Advanced Synergy Version Information --");
    122.    Print("Files that need to be updated: ", li_44);
    123.    if (li_44 > 0) Print("Executing AutoUpdater.exe now...");
    124.    writeOutputFile(li_40, li_44);
    125.    closeOutputFile(li_40, li_44);
    126.    if (li_44 == 0) return (0);
    127.    int li_52 = runAutoUpdater();
    128.    if (li_48 == FALSE) return (0);
    129.    return (1);
    130. }

    131. int openOutputFile() {
    132.    bool li_4;
    133.    FileDelete("as2_update.txt");
    134.    int li_0 = FileOpen("as2_update.txt", FILE_WRITE);
    135.    if (li_0 < 1) {
    136.       Alert("Can not open as2_update.txt for writing!");
    137.       li_4 = TRUE;
    138.    } else li_4 = FALSE;
    139.    if (li_4 == FALSE) return (li_0);
    140.    else return (li_4);
    141. }

    142. void writeOutputFile(int ai_0, int ai_4) {
    143.    FileWrite(ai_0, ai_4);
    144.    for (int li_12 = 0; li_12 < ai_4; li_12++) FileWrite(ai_0, gsa_92[li_12] + ".ex4");
    145. }

    146. void closeOutputFile(int ai_0, int ai_4) {
    147.    FileClose(ai_0);
    148. }

    149. void fillGlobalBuffers(string as_0) {
    150.    string ls_8;
    151.    string ls_16;
    152.    string ls_24;
    153.    int li_32 = -1;
    154.    int li_40 = 0;
    155.    string ls_44 = "";//gGrab(as_0 + "update.php", 0);
    156.    FileDelete("temp.txt");
    157.    int li_36 = FileOpen("temp.txt", FILE_WRITE|FILE_READ);
    158.    if (li_36 < 1) {
    159.       Alert("Can not open temp text file!");
    160.       return;
    161.    }
    162.    Print(ls_44);
    163.    FileWrite(li_36, ls_44);
    164.    FileSeek(li_36, 0, SEEK_SET);
    165.    gi_76 = StrToDouble(FileReadString(li_36));
    166.    while (true) {
    167.       ls_24 = FileReadString(li_36);
    168.       if (StringFind(ls_24, "DONE") != -1) break;
    169.       li_32 = StringFind(ls_24, ",", 0);
    170.       ls_8 = StringSubstr(ls_24, 0, li_32);
    171.       ls_16 = StringSubstr(ls_24, li_32 + 1, StringLen(ls_24) - li_32);
    172.       gda_84[li_40] = StrToDouble(ls_16);
    173.       gsa_88[li_40] = ls_8;
    174.       li_40++;
    175.       if (!(FileIsEnding(li_36))) continue;
    176.       break;
    177.    }
    178.    FileClose(li_36);
    179. }

    180. void logResult(string as_0, int ai_8, string as_12) {
    181.    int li_20 = FileOpen("indicators_debug.txt", FILE_CSV|FILE_WRITE|FILE_READ, ",");
    182.    if (li_20 < 1) {
    183.       Print("Cannot open indicators_debug.txt for appendage!");
    184.       return;
    185.    }
    186.    if (FileSeek(li_20, 0, SEEK_END) == FALSE) {
    187.       Print("Problem seeking to the end of the file! Aborting...");
    188.       return;
    189.    }
    190.    FileWrite(li_20, as_0, TimeCurrent(), ai_8, as_12);
    191.    FileClose(li_20);
    192. }

    193. int init() {
    194.    string ls_0;
    195.    if (Custom_Indicator == "verInfo_AS") {
    196.       IndicatorBuffers(1);
    197.       SetIndexBuffer(0, gda_80);
    198.       return (0);
    199.    }
    200.    if (Copyright != "98w34988suesdfe") {
    201.       if (Copyright == "987349873498734") {
    202.          gi_124 = 8;
    203.          gi_128 = 5;
    204.       }
    205.       if (!IsDllsAllowed()) {
    206.          Alert("WARNING: Must allow DLL imports. Go to Tools > Options > Expert Advisors and check "Allow DLL imports".");
    207.          gi_192 = TRUE;
    208.          return (0);
    209.       }
    210.       IndicatorShortName("Traders Dynamic Index | www.compassfx.com  ");
    211.       SetIndexBuffer(0, gda_164);
    212.       SetIndexBuffer(1, gda_168);
    213.       SetIndexBuffer(2, gda_172);
    214.       SetIndexBuffer(3, gda_176);
    215.       SetIndexBuffer(4, gda_180);
    216.       SetIndexBuffer(5, gda_184);
    217.       SetIndexStyle(0, DRAW_NONE);
    218.       SetIndexStyle(1, DRAW_LINE);
    219.       SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 2);
    220.       SetIndexStyle(3, DRAW_LINE);
    221.       SetIndexStyle(4, DRAW_LINE, STYLE_SOLID, 2);
    222.       SetIndexStyle(5, DRAW_LINE, STYLE_SOLID, 2);
    223.       SetIndexLabel(0, NULL);
    224.       SetIndexLabel(1, "Upper Limit");
    225.       SetIndexLabel(2, "Market Base Line");
    226.       SetIndexLabel(3, "Lower Limit");
    227.       SetIndexLabel(4, "RSI Price Line");
    228.       SetIndexLabel(5, "Trade Signal Line");
    229.       SetLevelValue(0, 50);
    230.       SetLevelValue(1, 68);
    231.       SetLevelValue(2, 32);
    232.       SetLevelStyle(2, 1, Gray);
    233.       ls_0 = strToUpper(TDI_Fast);
    234.       if (StringFind(ls_0, "ON") != -1) {
    235.          gi_124 = 8;
    236.          gi_128 = 5;
    237.       }
    238.       gi_192 = FALSE;
    239.       gi_188 = FileOpen("advsynergy.bin", FILE_CSV|FILE_READ);
    240.       if (gi_188 < 1) {
    241.          gi_248 = FALSE;
    242.          if (isInstallerRunning() != 1) {
    243.             gi_192 = TRUE;
    244.             return (0);
    245.          }
    246.          runAutoInstaller();
    247.          gi_192 = TRUE;
    248.          return (0);
    249.       }
    250.       gs_228 = FileReadString(gi_188);
    251.       gs_236 = FileReadString(gi_188);
    252.       gi_244 = StrToInteger(FileReadString(gi_188));
    253.       gs_280 = FileReadString(gi_188);
    254.       if (gs_280 == "") gs_280 = "x";
    255.       FileClose(gi_188);
    256.       gi_248 = TRUE;
    257.       gs_212 = gs_228;
    258.       gs_220 = gs_236;
    259.       if (GlobalVariableCheck("aSyn")) {
    260.          gi_252 = GlobalVariableGet("aSyn");
    261.          gi_256 = TimeLocal();
    262.          if (gi_252 > gi_256) {
    263.             gi_192 = mylogin(gs_228, gs_236);
    264.             if (gi_288 == 1) {
    265.                gi_192 = mylogin(gs_228, gs_236);
    266.                gi_288 = -1;
    267.             }
    268.             if (gi_192) return (0);
    269.          }
    270.          if (gi_256 - gi_252 >= 900) {
    271.             gi_192 = mylogin(gs_228, gs_236);
    272.             if (gi_288 == 1) {
    273.                gi_192 = mylogin(gs_228, gs_236);
    274.                gi_288 = -1;
    275.             }
    276.             if (gi_192) return (0);
    277.          }
    278.          if (gi_256 - gi_252 <= gi_260) return (0);
    279.          gi_192 = mykeepalive();
    280.          if (gi_288 == 1) {
    281.             gi_192 = mykeepalive();
    282.             gi_288 = -1;
    283.          }
    284.          if (!(gi_192)) return (0);
    285.          return (0);
    286.       }
    287.       gi_192 = mylogin(gs_228, gs_236);
    288.       if (gi_288 == 1) {
    289.          gi_192 = mylogin(gs_228, gs_236);
    290.          gi_288 = -1;
    291.       }
    292.       return (0);
    293.    } else SetIndexBuffer(0, gda_164);
    294.    return (0);
    295. }

    296. int start() {
    297.    double ld_4;
    298.    double lda_12[];
    299.    //if (gi_192) return (0);
    300.    if (Custom_Indicator == "verInfo_AS") {
    301.       gda_80[0] = 2.02;
    302.       return (0);
    303.    }
    304.    if (Copyright == "98w34988suesdfe") {
    305.       gda_164[0] = 14325.112;
    306.       return (0);
    307.    }
    308.    if (Copyright != "98w34988suesdfe" && !gi_204) {
    309.       gi_204 = TRUE;
    310.       gs_196 = "Synergy_TDI";
    311.       if (checkFilename() == -1) {
    312.          gi_192 = TRUE;
    313.          Alert("Filename has been changed -- Indicator haulting");
    314.          return (-1);
    315.       }
    316.    }
    317.    if (!gi_192) {
    318.       if (GlobalVariableCheck("aSyn")) {
    319.          gi_252 = GlobalVariableGet("aSyn");
    320.          gi_256 = TimeLocal();
    321.          if (gi_252 > gi_256) {
    322.             gi_192 = mylogin(gs_228, gs_236);
    323.             if (gi_288 == 1) {
    324.                gi_192 = mylogin(gs_228, gs_236);
    325.                gi_288 = -1;
    326.             }
    327.             if (gi_192) return (0);
    328.          }
    329.          if (gi_256 - gi_252 >= 900) {
    330.             gi_192 = mylogin(gs_228, gs_236);
    331.             if (gi_288 == 1) {
    332.                gi_192 = mylogin(gs_228, gs_236);
    333.                gi_288 = -1;
    334.             }
    335.             if (gi_192) return (0);
    336.          }
    337.          if (gi_256 - gi_252 > gi_260) {
    338.             gi_192 = mykeepalive();
    339.             if (gi_288 == 1) {
    340.                gi_192 = mykeepalive();
    341.                gi_288 = -1;
    342.             }
    343.             if (gi_192) return (0);
    344.          }
    345.       } else {
    346.          resetIndy();
    347.          gi_192 = TRUE;
    348.          return (0);
    349.       }
    350.    }
    351.    ArrayResize(lda_12, 34);
    352.    int li_16 = IndicatorCounted();
    353.    int li_20 = Bars - li_16 - 1;
    354.    for (int li_24 = li_20; li_24 >= 0; li_24--) {
    355.       gda_164[li_24] = iRSI(NULL, 0, gi_124, gi_128, li_24);
    356.       ld_4 = 0;
    357.       for (int li_28 = li_24; li_28 < li_24 + 34; li_28++) {
    358.          lda_12[li_28 - li_24] = gda_164[li_28];
    359.          ld_4 += gda_164[li_28] / 34.0;
    360.       }
    361.       gda_168[li_24] = ld_4 + 1.6185 * StDev(lda_12, 34);
    362.       gda_176[li_24] = ld_4 - 1.6185 * StDev(lda_12, 34);
    363.       gda_172[li_24] = (gda_168[li_24] + gda_176[li_24]) / 2.0;
    364.    }
    365.    for (li_24 = li_20; li_24 >= 0; li_24--) {
    366.       gda_180[li_24] = iMAOnArray(gda_164, 0, 2, 0, MODE_SMA, li_24);
    367.       gda_184[li_24] = iMAOnArray(gda_164, 0, 7, 0, MODE_SMA, li_24);
    368.    }
    369.    return (0);
    370. }

    371. double StDev(double ada_0[], int ai_4) {
    372.    return (MathSqrt(Variance(ada_0, ai_4)));
    373. }

    374. double Variance(double ada_0[], int ai_4) {
    375.    double ld_8;
    376.    double ld_16;
    377.    for (int li_24 = 0; li_24 < ai_4; li_24++) {
    378.       ld_8 += ada_0[li_24];
    379.       ld_16 += MathPow(ada_0[li_24], 2);
    380.    }
    381.    return ((ld_16 * ai_4 - ld_8 * ld_8) / (ai_4 * (ai_4 - 1)));
    382. }

    383. int checkFilename() {
    384.    double ld_0 = iCustom(NULL, 0, gs_196, "", "98w34988suesdfe", "", "", "", "", "", 0, 0);
    385.    if (ld_0 != 14325.112) return (-1);
    386.    else return (1);
    387. }

    388. int mylogin(string as_0, string as_8) {
    389.    string ls_16;
    390.    int li_24;
    391.    int li_28;
    392.    int li_40;
    393.    if (GlobalVariableCheck("rA_synergy")) {
    394.       if (isExeRunning() != 1) {
    395.          gi_192 = TRUE;
    396.          return (1);
    397.       }
    398.       GlobalVariableDel("rA_synergy");
    399.    }
    400.    int li_32 = -1;
    401.    string ls_44 = StringConcatenate(gs_264, "login_test.php");
    402.    string ls_52 = StringConcatenate("user=", as_0, "&pass=", as_8, "&ver=2%2E1");
    403.    string ls_60 = "";//gGrab(ls_44, ls_52);
    404.    if (StringSubstr(ls_60, 0, 1) == "0") li_32 = 0;
    405.    if (StringSubstr(ls_60, 0, 1) == "2") li_32 = 2;
    406.    if (StringSubstr(ls_60, 0, 1) == "3") li_32 = 3;
    407.    if (StringSubstr(ls_60, 0, 1) == "4") li_32 = 4;
    408.    if (StringSubstr(ls_60, 0, 1) == "6") li_32 = 6;
    409.    if (StringSubstr(ls_60, 0, 1) == "7") li_32 = 7;
    410.    GlobalVariableDel("advSynSW");
    411.    logResult("TDI", li_32, " LOGIN");
    412.    switch (li_32) {
    413.    case 0:
    414.       gi_192 = doLoginCheck(gs_264);
    415.       if (gi_192) return (1);
    416.       li_24 = StringFind(ls_60, "SVR=");
    417.       li_28 = StringFind(ls_60, "DONE");
    418.       li_40 = StringFind(ls_60, "zZD1");
    419.       if (li_24 == -1) gs_280 = "x";
    420.       else {
    421.          if (li_28 == -1) gs_280 = "x";
    422.          gs_280 = StringSubstr(ls_60, li_24 + 4, li_28 - li_24 - 4);
    423.       }
    424.       gi_260 = StrToInteger(StringSubstr(ls_60, 4, li_40 - 4));
    425.       if (gi_260 <= 0) gi_260 = 180;
    426.       if (gi_260 >= 600) gi_260 = 600;
    427.       gi_208 = TimeLocal();
    428.       gs_212 = as_0;
    429.       gs_220 = as_8;
    430.       GlobalVariableSet("aSyn", TimeLocal());
    431.       gi_188 = FileOpen("advsynergy.bin", FILE_WRITE, 8);
    432.       if (gi_188 < 1) {
    433.          Print("Cannot open password cache!");
    434.          return (0);
    435.       }
    436.       FileWrite(gi_188, gs_228);
    437.       FileWrite(gi_188, gs_236);
    438.       FileWrite(gi_188, TimeLocal());
    439.       FileWrite(gi_188, gs_280);
    440.       FileClose(gi_188);
    441.       return (0);
    442.    case 7:
    443.       Alert(StringSubstr(ls_60, 4, StringLen(ls_60)));
    444.       gi_208 = TimeLocal();
    445.       gs_212 = gs_228;
    446.       GlobalVariableSet("aSyn", TimeLocal());
    447.       gi_188 = FileOpen("advsynergy.bin", FILE_WRITE, 8);
    448.       if (gi_188 < 1) {
    449.          Print("Cannot open password cache!");
    450.          return (0);
    451.       }
    452.       FileWrite(gi_188, gs_228);
    453.       FileWrite(gi_188, gs_236);
    454.       FileWrite(gi_188, TimeLocal());
    455.       FileClose(gi_188);
    456.       return (0);
    457.    case 6:
    458.       Alert(StringSubstr(ls_60, 4, StringLen(ls_60)));
    459.       if (gi_248) FileDelete("advsynergy.bin");
    460.       return (1);
    461.    case 2:
    462.       Alert("Incorrect EMail -- Please check your EMail address spelling.");
    463.       if (gi_248) FileDelete("advsynergy.bin");
    464.       return (1);
    465.    case 3:
    466.       Alert("Email OK -- Incorrect Password!\n Please check your password spelling\n and make sure Caps Lock is NOT on.");
    467.       if (gi_248) FileDelete("advsynergy.bin");
    468.       return (1);
    469.    case 4:
    470.       Alert("Your account has been disabled!\n Please contact support@compassfx.com");
    471.       if (gi_248) FileDelete("advsynergy.bin");
    472.       return (1);
    473.    case -1:
    474.       if (gs_280 != "x" && gs_280 != "" && gs_272 != gs_280) gs_272 = gs_280;
    475.       if (gs_264 == gs_272) {
    476.          if (IsConnected()) {
    477.             Alert("Connection Error!\n An error connecting to the Internet has occurred.\n Please close MetaTrader and re-open.");
    478.             resetIndy();
    479.             return (1);
    480.          }
    481.          gi_96 = FileOpen("advsynergy.bin", FILE_CSV|FILE_READ);
    482.          if (gi_96 < 1) return (1);
    483.          FileClose(gi_96);
    484.          gs_212 = as_0;
    485.          gs_220 = as_8;
    486.          GlobalVariableSet("aSyn", TimeLocal());
    487.          return (0);
    488.       }
    489.       gs_264 = gs_272;
    490.       gi_288 = 1;
    491.       return (1);
    492.    }
    493.    return (0);
    494. }

    495. int mykeepalive() {
    496.    int li_0 = -1;
    497.    string ls_4 = StringConcatenate(gs_264, "keepalive_new.php");
    498.    string ls_12 = StringConcatenate("user=", gs_212, "&pass=", gs_220);
    499.    string ls_20 = "";//gGrab(ls_4, ls_12);
    500.    if (StringSubstr(ls_20, 0, 1) == "0") li_0 = 0;
    501.    if (StringSubstr(ls_20, 0, 1) == "1") li_0 = 1;
    502.    if (StringSubstr(ls_20, 0, 1) == "2") li_0 = 2;
    503.    if (StringSubstr(ls_20, 0, 1) == "3") li_0 = 3;
    504.    if (StringSubstr(ls_20, 0, 1) == "4") li_0 = 4;
    505.    if (StringSubstr(ls_20, 0, 1) == "5") li_0 = 5;
    506.    if (li_0 != -1)
    507.       if (GlobalVariableCheck("advSynSW")) GlobalVariableDel("advSynSW");
    508.    logResult("TDI", li_0, DoubleToStr(GlobalVariableCheck("advSynSW"), 0) + " -- KEEPALIVE");
    509.    switch (li_0) {
    510.    case 1:
    511.       gi_192 = mylogin(gs_212, gs_220);
    512.       if (gi_288 == 1) {
    513.          gi_192 = mylogin(gs_212, gs_220);
    514.          gi_288 = -1;
    515.       }
    516.       return (0);
    517.    case 2:
    518.       Alert("Your account has been logged into from a different computer.\n  This connection has been terminated.");
    519.       resetIndy();
    520.       return (1);
    521.    case 3:
    522.       Alert("Your username was not found in our database of logged in users.\n Please close indicators and re-open\n them to re-login.");
    523.       resetIndy();
    524.       return (1);
    525.    case 4:
    526.       Alert(StringSubstr(ls_20, 4, StringLen(ls_20)));
    527.       GlobalVariableSet("aSyn", TimeLocal());
    528.       break;
    529.    case 5:
    530.       Alert(StringSubstr(ls_20, 4, StringLen(ls_20)));
    531.       resetIndy();
    532.       return (1);
    533.    case -1:
    534.       if (gs_280 != "x" && gs_280 != "" && gs_280 != gs_272) gs_272 = gs_280;
    535.       if (gs_264 == gs_272) {
    536.          if (GlobalVariableCheck("advSynSW")) {
    537.             if (TimeLocal() - GlobalVariableGet("advSynSW") <= 1200.0) break;
    538.             if (IsConnected()) {
    539.                Alert("Connection Error!\n An error connecting to the Internet has occurred.\n Please close MetaTrader and re-open.");
    540.                resetIndy();
    541.                return (1);
    542.             }
    543.             gi_96 = FileOpen("advsynergy.bin", FILE_CSV|FILE_READ);
    544.             if (gi_96 < 1) return (1);
    545.             FileClose(gi_96);
    546.             return (0);
    547.          }
    548.          GlobalVariableSet("advSynSW", TimeLocal());
    549.       } else {
    550.          gs_264 = gs_272;
    551.          gi_288 = 1;
    552.          return (1);
    553.       }
    554.       break;
    555.    }
    556.    GlobalVariableSet("aSyn", TimeLocal());
    557.    return (0);
    558. }

    559. void resetIndy() {
    560.    ArrayInitialize(gda_164, EMPTY_VALUE);
    561.    ArrayInitialize(gda_168, EMPTY_VALUE);
    562.    ArrayInitialize(gda_172, EMPTY_VALUE);
    563.    ArrayInitialize(gda_180, EMPTY_VALUE);
    564.    ArrayInitialize(gda_184, EMPTY_VALUE);
    565.    ArrayInitialize(gda_176, EMPTY_VALUE);
    566.    GlobalVariableDel("aSyn");
    567.    GlobalVariableDel("advSynSW");
    568. }

    569. string strToUpper(string as_0) {
    570.    int li_24;
    571.    string ls_8 = "";
    572.    int li_16 = StringLen(as_0);
    573.    for (int li_20 = 0; li_20 < li_16; li_20++) {
    574.       li_24 = StringGetChar(as_0, li_20);
    575.       if (li_24 >= 'a' && li_24 <= 'z') li_24 -= 32;
    576.       ls_8 = StringSetChar(ls_8, li_20, li_24);
    577.    }
    578.    return (ls_8);
    579. }
    580. int isInstallerRunning(){
    581. return(0);
    582. }
    583. void runAutoInstaller(){
    584. }
    585. int runAutoUpdater(){return(0);}
    586. int isExeRunning(){return(0);}
    复制代码



    Synergy_TDI.zip
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 6 个

    abiao915659 LV5

    发表于 2016-5-18 14:15:46 | 显示全部楼层

    瞬间的光辉 的全套EA教程视频(带讲课源码和讲义)
    土豆可以搜到部分视频教程,我花钱买了全套的,
    加Q2011108529 免费送

    g8uu7qg0r LV2

    发表于 2020-6-22 12:37:19 | 显示全部楼层

    不错,支持下楼主

    倾听那旋律 LV3

    发表于 2020-8-15 18:59:48 | 显示全部楼层

    谢谢楼主分享

    童真美 LV4

    发表于 2020-8-23 15:05:36 | 显示全部楼层

    学习了,不错

    merry LV4

    发表于 2020-8-27 10:00:06 | 显示全部楼层

    学习了,不错

    东哥点金 LV3

    发表于 2021-7-14 17:05:04 | 显示全部楼层

    谢谢
    您需要登录后才可以回帖 登录 | 注册

    提醒: 禁止引战、谩骂、灌水内容

    微信二维码

    有问题联系客服