Rejoindre la communauté
banner_forum
Devenez membre de la plus grande
communauté francophone sur le Forex
Partagez, échangez et apprenez en gagnant des crédits sur votre compte de trading

Indicateur Forex Day Monster - erreur code source

  • Anthony54

    Bonjour,

    J'ai télécharger sur internet indicateur complet "FOREX DAY MONSTER", cependant je me rencontre que je n'est pas la même chose sur mon écran que celui du site web sur lequel je les télécharger, il me manque "FDM Oscillateur", j'ai tenté X fois de télécharger autre part l'indicateur complet mais toujours le même problème; Même sur un autre ordinateur sa ne fonctionne pas.

    Puis je me suis rencontré qu'il y avait une erreur dans le code source, quand je clique sur "Compile" dans MetaEditor, j'ai le message suivant: "using of decompiled source code is prohibited"

    Mes connaissances en programmations étant très limitée, je vous serai éternellement reconnaissant si vous pouvez m'aider sur ce point ^^

    Merci!

    Voila le code source complet:

    Code
    /* */ #property copyright "Copyright © 2013, Forex Day Monster" #property link "www.forexprofitmonster.com" #property indicator_separate_window #property indicator_minimum 0.0 #property indicator_maximum 100.0 #property indicator_buffers 6 #property indicator_color1 DimGray #property indicator_color2 DimGray #property indicator_color3 DarkGreen #property indicator_color4 Maroon #property indicator_color5 Lime #property indicator_color6 Red extern string note1 = "Chart Time Frame"; extern string note2 = "0=current time frame"; extern string note3 = "1=M1, 5=M5, 15=M15, 30=M30"; extern string note4 = "60=H1, 240=H4, 1440=D1"; extern string note5 = "10080=W1, 43200=MN1"; extern int timeFrame = 0; int g_period_120 = 13; int gi_124 = 3; int g_slowing_128 = 3; int g_ma_method_132 = MODE_EMA; int g_price_field_136 = 0; double gd_140 = 80.0; double gd_148 = 20.0; bool gi_156 = TRUE; bool gi_160 = FALSE; bool gi_164 = FALSE; bool gi_168 = FALSE; bool gi_172 = FALSE; bool gi_176 = FALSE; double g_ibuf_180[]; double g_ibuf_184[]; double g_ibuf_188[]; double g_ibuf_192[]; double g_ibuf_196[]; double g_ibuf_200[]; int g_timeframe_204; int gia_208[]; int gi_212; int gi_216; string gs_nothing_220 = "nothing"; datetime g_time_228; int init() { SetIndexBuffer(0, g_ibuf_184); SetIndexBuffer(1, g_ibuf_180); SetIndexBuffer(2, g_ibuf_188); SetIndexBuffer(3, g_ibuf_192); SetIndexBuffer(4, g_ibuf_196); SetIndexBuffer(5, g_ibuf_200); if (gi_156) { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_NONE); SetIndexStyle(2, DRAW_HISTOGRAM); SetIndexStyle(3, DRAW_HISTOGRAM); SetIndexStyle(4, DRAW_HISTOGRAM); SetIndexStyle(5, DRAW_HISTOGRAM); SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); } else { SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); SetIndexStyle(0, DRAW_LINE); SetIndexStyle(1, DRAW_LINE); SetIndexStyle(2, DRAW_LINE); SetIndexStyle(3, DRAW_LINE); SetIndexStyle(4, DRAW_NONE); SetIndexStyle(5, DRAW_NONE); gi_124 = MathMax(gi_124, 1); if (gi_124 == 1) { SetIndexStyle(0, DRAW_NONE); SetIndexLabel(0, NULL); } else { SetIndexStyle(0, DRAW_LINE); SetIndexLabel(0, "FDM Signal"); } } g_timeframe_204 = stringToTimeFrame(timeFrame); string ls_0 = "FDM Oscillator (" + TimeFrameToString(g_timeframe_204); IndicatorShortName(ls_0 + ")"); return (0); } int deinit() { DeleteArrows(); return (0); } int start() { int l_ind_counted_0 = IndicatorCounted(); if (l_ind_counted_0 < 0) return (-1); int li_4 = MathMax(Bars - l_ind_counted_0, g_timeframe_204 / Period()); ArrayCopySeries(gia_208, 5, NULL, g_timeframe_204); int l_index_8 = 0; int l_shift_12 = 0; while (l_index_8 < li_4) { if (Time[l_index_8] < gia_208[l_shift_12]) l_shift_12++; g_ibuf_180[l_index_8] = iStochastic(NULL, g_timeframe_204, g_period_120, gi_124, g_slowing_128, g_ma_method_132, g_price_field_136, MODE_MAIN, l_shift_12); g_ibuf_184[l_index_8] = iStochastic(NULL, g_timeframe_204, g_period_120, gi_124, g_slowing_128, g_ma_method_132, g_price_field_136, MODE_SIGNAL, l_shift_12); l_index_8++; } l_index_8 = li_4; l_shift_12 = 0; while (l_index_8 >= 0) { if (gi_156) { g_ibuf_188[l_index_8] = EMPTY_VALUE; g_ibuf_192[l_index_8] = EMPTY_VALUE; if (g_ibuf_180[l_index_8] > gd_140) g_ibuf_188[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] < gd_148) g_ibuf_192[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] > g_ibuf_180[l_index_8 + 1]) g_ibuf_196[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] < g_ibuf_180[l_index_8 + 1]) g_ibuf_200[l_index_8] = 100; else { g_ibuf_196[l_index_8] = g_ibuf_196[l_index_8 + 1]; g_ibuf_200[l_index_8] = g_ibuf_200[l_index_8 + 1]; } } } } } else { if (g_ibuf_180[l_index_8] > gd_140) { g_ibuf_188[l_index_8] = g_ibuf_180[l_index_8]; g_ibuf_188[l_index_8 + 1] = g_ibuf_180[l_index_8 + 1]; } else { g_ibuf_188[l_index_8] = EMPTY_VALUE; if (g_ibuf_188[l_index_8 + 2] == EMPTY_VALUE) g_ibuf_188[l_index_8 + 1] = EMPTY_VALUE; } if (g_ibuf_180[l_index_8] < gd_148) { g_ibuf_192[l_index_8] = g_ibuf_180[l_index_8]; g_ibuf_192[l_index_8 + 1] = g_ibuf_180[l_index_8 + 1]; } else { g_ibuf_192[l_index_8] = EMPTY_VALUE; if (g_ibuf_192[l_index_8 + 2] == EMPTY_VALUE) g_ibuf_192[l_index_8 + 1] = EMPTY_VALUE; } } l_index_8--; } DeleteArrows(); if (gi_160) { gi_216 = MathCeil(iATR(NULL, 0, 50, 0) / Point); for (l_index_8 = 0; l_index_8 < WindowBarsPerChart(); l_index_8++) { if (g_ibuf_180[l_index_8] > gd_140 && g_ibuf_180[l_index_8 + 1] < gd_140) DrawArrow(l_index_8, "up"); if (g_ibuf_180[l_index_8] < gd_148 && g_ibuf_180[l_index_8 + 1] > gd_148) DrawArrow(l_index_8, "down"); } } if (gi_164) { if (g_ibuf_180[0] > gd_140 && g_ibuf_180[1] < gd_140) doAlert(gd_140 + " line crossed up"); if (g_ibuf_180[0] < gd_148 && g_ibuf_180[1] > gd_148) doAlert(gd_140 + " line crossed down"); } return (0); } void DrawArrow(int ai_0, string as_4) { gi_212++; string l_str_concat_12 = StringConcatenate("FDM Signal", gi_212); ObjectCreate(l_str_concat_12, OBJ_ARROW, 0, Time[ai_0], 0); if (as_4 == "up") { ObjectSet(l_str_concat_12, OBJPROP_PRICE1, High[ai_0] + gi_216 * Point); ObjectSet(l_str_concat_12, OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN); ObjectSet(l_str_concat_12, OBJPROP_COLOR, Red); return; } ObjectSet(l_str_concat_12, OBJPROP_PRICE1, Low[ai_0] - gi_216 * Point); ObjectSet(l_str_concat_12, OBJPROP_ARROWCODE, SYMBOL_ARROWUP); ObjectSet(l_str_concat_12, OBJPROP_COLOR, LimeGreen); } void DeleteArrows() { while (gi_212 > 0) { ObjectDelete(StringConcatenate("FDM Signal", gi_212)); gi_212--; } } void doAlert(string as_0) { string l_str_concat_8; if (gs_nothing_220 != as_0 || g_time_228 != Time[0]) { gs_nothing_220 = as_0; g_time_228 = Time[0]; l_str_concat_8 = StringConcatenate(Symbol(), " at ", TimeToStr(TimeLocal(), TIME_SECONDS), " FDM Oscillator ", as_0); if (gi_168) Alert(l_str_concat_8); if (gi_172) PlaySound("alert2.wav"); if (gi_176) SendMail(StringConcatenate(Symbol(), " FDM Oscillator crossing"), l_str_concat_8); } } int stringToTimeFrame(string as_0) { int l_timeframe_8 = 0; as_0 = StringUpperCase(as_0); if (as_0 == "M1" || as_0 == "1") l_timeframe_8 = 1; if (as_0 == "M5" || as_0 == "5") l_timeframe_8 = 5; if (as_0 == "M15" || as_0 == "15") l_timeframe_8 = 15; if (as_0 == "M30" || as_0 == "30") l_timeframe_8 = 30; if (as_0 == "H1" || as_0 == "60") l_timeframe_8 = 60; if (as_0 == "H4" || as_0 == "240") l_timeframe_8 = 240; if (as_0 == "D1" || as_0 == "1440") l_timeframe_8 = 1440; if (as_0 == "W1" || as_0 == "10080") l_timeframe_8 = 10080; if (as_0 == "MN" || as_0 == "43200") l_timeframe_8 = 43200; if (l_timeframe_8 < Period()) l_timeframe_8 = Period(); return (l_timeframe_8); } string TimeFrameToString(int ai_0) { string ls_ret_4 = "Current time frame"; switch (ai_0) { case 1: ls_ret_4 = "M1"; break; case 5: ls_ret_4 = "M5"; break; case 15: ls_ret_4 = "M15"; break; case 30: ls_ret_4 = "M30"; break; case 60: ls_ret_4 = "H1"; break; case 240: ls_ret_4 = "H4"; break; case 1440: ls_ret_4 = "D1"; break; case 10080: ls_ret_4 = "W1"; break; case 43200: ls_ret_4 = "MN1"; } return (ls_ret_4); } string StringUpperCase(string as_0) { int li_20; string ls_ret_8 = as_0; for (int li_16 = StringLen(as_0) - 1; li_16 >= 0; li_16--) { li_20 = StringGetChar(ls_ret_8, li_16); if ((li_20 > '`' && li_20 < '{') || (li_20 > 'ß' && li_20 < 256)) ls_ret_8 = StringSetChar(ls_ret_8, li_16, li_20 - 32); else if (li_20 > -33 && li_20 < 0) ls_ret_8 = StringSetChar(ls_ret_8, li_16, li_20 + 224); } return (0); }
  • JJFlash

    quand tu compiles, sa te donne la ligne où y'a l'erreur. Regarde quelle ligne c'est
  • Anthony54 — en réponse à JJFlash dans son message #81412

    Bonjour JJFlash,

    Tout d'abord merci de tentez de m'aidez.
    Donc j'ai fait ce que tu ma dit, et contre toute attente, c'est la première ligne du code qui a un problème "/*" ... J'ai tenter de l'enlever, sans succès toujours. Selon toi?

    Anthony
  • EroTiXx

    enlève les deux

    /*

    */
  • JJFlash

    Enlève les deux premières lignes (le /* et */)
    Met ça a la place :
    Code
    //+------------------------------------------------------------------+ //| Forex_Day_Monster.mq4 | //| Copyright 2013, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+
  • Anthony54

    JJFlash, le 08/09/2013 dit :
    Enlève les deux premières lignes (le /* et */) Met ça a la place : Code //+------------------------------------------------------------------+ //| Forex_Day_Monster.mq4 | //| Copyright 2013, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+


    C'est toujours la même chose, d’ailleurs ce qui est étonnant c'est qu'a fois que je vais cliquez sur l'erreur, ce sera toujours la première ligne du code qui est visée, est sa, peut importe ce qui est écris... J'ai donc essayer de créée un nouveaux fichier sous MetaEditor, mais c'est exactement la même chose!
  • JJFlash

    Je sais pas si ça changé quelque chose, mais est ce que quand tu as créé le nouveau fichier MT4 tu as bien fait attention de coché "Indicateur" au début ?
    Si sa se trouve sa change rien mais bon, au point où tu en es ^^
  • Anthony54

    EroTiXx, le 08/09/2013 dit :
    enlève les deux /* */


    J'ai bien essayer, mais... toujours le même problème.
  • Anthony54

    JJFlash, le 08/09/2013 dit :
    Je sais pas si ça changé quelque chose, mais est ce que quand tu as créé le nouveau fichier MT4 tu as bien fait attention de coché "Indicateur" au début ? Si sa se trouve sa change rien mais bon, au point où tu en es ^^


    C'est vrais que je commence à désespérer ^^
    J'ai bien cocher effectivement "Custom Indicateur", et sa ne change rien, j'ai même essayer avec "ExpertAdvisors" et sa fait exactement le même problème...
  • JJFlash

    Bon c'est pas pour te dégoûté mais chez moi sa compile parfaitement ^^
    Je te passe le code tel quel :
    Code
    //+------------------------------------------------------------------+ //| help.mq4 | //| JJFlash | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2013, Forex Day Monster" #property link "www.forexprofitmonster.com" #property indicator_separate_window #property indicator_minimum 0.0 #property indicator_maximum 100.0 #property indicator_buffers 6 #property indicator_color1 DimGray #property indicator_color2 DimGray #property indicator_color3 DarkGreen #property indicator_color4 Maroon #property indicator_color5 Lime #property indicator_color6 Red extern string note1 = "Chart Time Frame"; extern string note2 = "0=current time frame"; extern string note3 = "1=M1, 5=M5, 15=M15, 30=M30"; extern string note4 = "60=H1, 240=H4, 1440=D1"; extern string note5 = "10080=W1, 43200=MN1"; extern int timeFrame = 0; int g_period_120 = 13; int gi_124 = 3; int g_slowing_128 = 3; int g_ma_method_132 = MODE_EMA; int g_price_field_136 = 0; double gd_140 = 80.0; double gd_148 = 20.0; bool gi_156 = TRUE; bool gi_160 = FALSE; bool gi_164 = FALSE; bool gi_168 = FALSE; bool gi_172 = FALSE; bool gi_176 = FALSE; double g_ibuf_180[]; double g_ibuf_184[]; double g_ibuf_188[]; double g_ibuf_192[]; double g_ibuf_196[]; double g_ibuf_200[]; int g_timeframe_204; int gia_208[]; int gi_212; int gi_216; string gs_nothing_220 = "nothing"; datetime g_time_228; int init() { SetIndexBuffer(0, g_ibuf_184); SetIndexBuffer(1, g_ibuf_180); SetIndexBuffer(2, g_ibuf_188); SetIndexBuffer(3, g_ibuf_192); SetIndexBuffer(4, g_ibuf_196); SetIndexBuffer(5, g_ibuf_200); if (gi_156) { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_NONE); SetIndexStyle(2, DRAW_HISTOGRAM); SetIndexStyle(3, DRAW_HISTOGRAM); SetIndexStyle(4, DRAW_HISTOGRAM); SetIndexStyle(5, DRAW_HISTOGRAM); SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); } else { SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); SetIndexStyle(0, DRAW_LINE); SetIndexStyle(1, DRAW_LINE); SetIndexStyle(2, DRAW_LINE); SetIndexStyle(3, DRAW_LINE); SetIndexStyle(4, DRAW_NONE); SetIndexStyle(5, DRAW_NONE); gi_124 = MathMax(gi_124, 1); if (gi_124 == 1) { SetIndexStyle(0, DRAW_NONE); SetIndexLabel(0, NULL); } else { SetIndexStyle(0, DRAW_LINE); SetIndexLabel(0, "FDM Signal"); } } g_timeframe_204 = stringToTimeFrame(timeFrame); string ls_0 = "FDM Oscillator (" + TimeFrameToString(g_timeframe_204); IndicatorShortName(ls_0 + ")"); return (0); } int deinit() { DeleteArrows(); return (0); } int start() { int l_ind_counted_0 = IndicatorCounted(); if (l_ind_counted_0 < 0) return (-1); int li_4 = MathMax(Bars - l_ind_counted_0, g_timeframe_204 / Period()); ArrayCopySeries(gia_208, 5, NULL, g_timeframe_204); int l_index_8 = 0; int l_shift_12 = 0; while (l_index_8 < li_4) { if (Time[l_index_8] < gia_208[l_shift_12]) l_shift_12++; g_ibuf_180[l_index_8] = iStochastic(NULL, g_timeframe_204, g_period_120, gi_124, g_slowing_128, g_ma_method_132, g_price_field_136, MODE_MAIN, l_shift_12); g_ibuf_184[l_index_8] = iStochastic(NULL, g_timeframe_204, g_period_120, gi_124, g_slowing_128, g_ma_method_132, g_price_field_136, MODE_SIGNAL, l_shift_12); l_index_8++; } l_index_8 = li_4; l_shift_12 = 0; while (l_index_8 >= 0) { if (gi_156) { g_ibuf_188[l_index_8] = EMPTY_VALUE; g_ibuf_192[l_index_8] = EMPTY_VALUE; if (g_ibuf_180[l_index_8] > gd_140) g_ibuf_188[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] < gd_148) g_ibuf_192[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] > g_ibuf_180[l_index_8 + 1]) g_ibuf_196[l_index_8] = 100; else { if (g_ibuf_180[l_index_8] < g_ibuf_180[l_index_8 + 1]) g_ibuf_200[l_index_8] = 100; else { g_ibuf_196[l_index_8] = g_ibuf_196[l_index_8 + 1]; g_ibuf_200[l_index_8] = g_ibuf_200[l_index_8 + 1]; } } } } } else { if (g_ibuf_180[l_index_8] > gd_140) { g_ibuf_188[l_index_8] = g_ibuf_180[l_index_8]; g_ibuf_188[l_index_8 + 1] = g_ibuf_180[l_index_8 + 1]; } else { g_ibuf_188[l_index_8] = EMPTY_VALUE; if (g_ibuf_188[l_index_8 + 2] == EMPTY_VALUE) g_ibuf_188[l_index_8 + 1] = EMPTY_VALUE; } if (g_ibuf_180[l_index_8] < gd_148) { g_ibuf_192[l_index_8] = g_ibuf_180[l_index_8]; g_ibuf_192[l_index_8 + 1] = g_ibuf_180[l_index_8 + 1]; } else { g_ibuf_192[l_index_8] = EMPTY_VALUE; if (g_ibuf_192[l_index_8 + 2] == EMPTY_VALUE) g_ibuf_192[l_index_8 + 1] = EMPTY_VALUE; } } l_index_8--; } DeleteArrows(); if (gi_160) { gi_216 = MathCeil(iATR(NULL, 0, 50, 0) / Point); for (l_index_8 = 0; l_index_8 < WindowBarsPerChart(); l_index_8++) { if (g_ibuf_180[l_index_8] > gd_140 && g_ibuf_180[l_index_8 + 1] < gd_140) DrawArrow(l_index_8, "up"); if (g_ibuf_180[l_index_8] < gd_148 && g_ibuf_180[l_index_8 + 1] > gd_148) DrawArrow(l_index_8, "down"); } } if (gi_164) { if (g_ibuf_180[0] > gd_140 && g_ibuf_180[1] < gd_140) doAlert(gd_140 + " line crossed up"); if (g_ibuf_180[0] < gd_148 && g_ibuf_180[1] > gd_148) doAlert(gd_140 + " line crossed down"); } return (0); } void DrawArrow(int ai_0, string as_4) { gi_212++; string l_str_concat_12 = StringConcatenate("FDM Signal", gi_212); ObjectCreate(l_str_concat_12, OBJ_ARROW, 0, Time[ai_0], 0); if (as_4 == "up") { ObjectSet(l_str_concat_12, OBJPROP_PRICE1, High[ai_0] + gi_216 * Point); ObjectSet(l_str_concat_12, OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN); ObjectSet(l_str_concat_12, OBJPROP_COLOR, Red); return; } ObjectSet(l_str_concat_12, OBJPROP_PRICE1, Low[ai_0] - gi_216 * Point); ObjectSet(l_str_concat_12, OBJPROP_ARROWCODE, SYMBOL_ARROWUP); ObjectSet(l_str_concat_12, OBJPROP_COLOR, LimeGreen); } void DeleteArrows() { while (gi_212 > 0) { ObjectDelete(StringConcatenate("FDM Signal", gi_212)); gi_212--; } } void doAlert(string as_0) { string l_str_concat_8; if (gs_nothing_220 != as_0 || g_time_228 != Time[0]) { gs_nothing_220 = as_0; g_time_228 = Time[0]; l_str_concat_8 = StringConcatenate(Symbol(), " at ", TimeToStr(TimeLocal(), TIME_SECONDS), " FDM Oscillator ", as_0); if (gi_168) Alert(l_str_concat_8); if (gi_172) PlaySound("alert2.wav"); if (gi_176) SendMail(StringConcatenate(Symbol(), " FDM Oscillator crossing"), l_str_concat_8); } } int stringToTimeFrame(string as_0) { int l_timeframe_8 = 0; as_0 = StringUpperCase(as_0); if (as_0 == "M1" || as_0 == "1") l_timeframe_8 = 1; if (as_0 == "M5" || as_0 == "5") l_timeframe_8 = 5; if (as_0 == "M15" || as_0 == "15") l_timeframe_8 = 15; if (as_0 == "M30" || as_0 == "30") l_timeframe_8 = 30; if (as_0 == "H1" || as_0 == "60") l_timeframe_8 = 60; if (as_0 == "H4" || as_0 == "240") l_timeframe_8 = 240; if (as_0 == "D1" || as_0 == "1440") l_timeframe_8 = 1440; if (as_0 == "W1" || as_0 == "10080") l_timeframe_8 = 10080; if (as_0 == "MN" || as_0 == "43200") l_timeframe_8 = 43200; if (l_timeframe_8 < Period()) l_timeframe_8 = Period(); return (l_timeframe_8); } string TimeFrameToString(int ai_0) { string ls_ret_4 = "Current time frame"; switch (ai_0) { case 1: ls_ret_4 = "M1"; break; case 5: ls_ret_4 = "M5"; break; case 15: ls_ret_4 = "M15"; break; case 30: ls_ret_4 = "M30"; break; case 60: ls_ret_4 = "H1"; break; case 240: ls_ret_4 = "H4"; break; case 1440: ls_ret_4 = "D1"; break; case 10080: ls_ret_4 = "W1"; break; case 43200: ls_ret_4 = "MN1"; } return (ls_ret_4); } string StringUpperCase(string as_0) { int li_20; string ls_ret_8 = as_0; for (int li_16 = StringLen(as_0) - 1; li_16 >= 0; li_16--) { li_20 = StringGetChar(ls_ret_8, li_16); if ((li_20 > '`' && li_20 < '{') || (li_20 > 'ß' && li_20 < 256)) ls_ret_8 = StringSetChar(ls_ret_8, li_16, li_20 - 32); else if (li_20 > -33 && li_20 < 0) ls_ret_8 = StringSetChar(ls_ret_8, li_16, li_20 + 224); } return (0); }

    essaye avec sa, c'est exactement la même chose que toi, donc si sa compile pas, c'est que sa peut venir de ton metaeditor ! t'es chez quelle broker forex ?
  • Anthony54 — en réponse à JJFlash dans son message #81420

    Je suis chez AlpariUK, mais pour en avoir le cœur net, je vient d'essayer avec XTB, et ActivTrade, et j'ai le même problème! Croyant que sa pouvait venir de l'ordinateur, j'ai tester sur un autr eposte de bureau et un ordinateur portable, et deviné?... Même chose!

    JJFlash, peut-tu m'envoyer le fichier indicateur que tu a réussi à compiler? Sa peut peut-être fonctionner.
    Autre chose que j'ai pu remarquer, lorsque je vais chercher "FDM Oscillator" dans le navigateur MT4 je peut voir le fichier, alors qu’a partir de l'onglet "Insertion/Indicateurs/Personnalisés" je ne le vois pas, et ceci sur toutes les plateformes...
    Modifié le 2013-09-08 14:35:34 par Anthony54
  • Anthony54

    Bonjour à tous,

    Je revient sur ce fil de discussion car je m’aperçois après quelques recherche que ma demande portez à des propos illégale...
    Comme Tonyboy me la dit en message privée, le mieux était que j'achète le logiciel, jusqu’à présent je ne savais même pas qu'il se vendez, enfin pour finir ces ce que j'ai fait, et toute est rentré dans l'ordre!

    Sans vouloir faire de PUB, sachez que le logiciel officiel ce vend sur le lien ci-dessous, ne vous faîte pas arnaquer par d'autre vendeur comme j'ai bien failli tomber dans leur pièges!

    http://forexprofitmonster.com/

    En tout cas, merci à tous pour votre aide!

    Anthony
    Modifié le 2013-09-10 12:06:16 par Anthony54
  • furynick

    Waaaahhhh, le truc de taré, MTQ à été jusqu'à détecter le code décompilé !
    Les version récentes de metalang refusent de compiler du code décompilé ... mais ce n'est que du bluff.

    Par contre ça va être un poil plus pénible, il faut renommer toutes les variables :)
    Bon courage.
  • furynick

    Aller, je suis sympa, je file le code qui se compile sans problème :)
    Moins de 10mn pour contourner cette protection bidon (on peut pas protéger un code source, faut arrêter de croire au père-noël).
    Code
    #property copyright "Copyright © 2013, Forex Day Monster" #property link "www.forexprofitmonster.com" #property indicator_separate_window #property indicator_minimum 0.0 #property indicator_maximum 100.0 #property indicator_buffers 6 #property indicator_color1 DimGray #property indicator_color2 DimGray #property indicator_color3 DarkGreen #property indicator_color4 Maroon #property indicator_color5 Lime #property indicator_color6 Red extern string note1 = "Chart Time Frame"; extern string note2 = "0=current time frame"; extern string note3 = "1=M1, 5=M5, 15=M15, 30=M30"; extern string note4 = "60=H1, 240=H4, 1440=D1"; extern string note5 = "10080=W1, 43200=MN1"; extern int timeFrame = 0; int g.period.120 = 13; int gi.124 = 3; int g.slowing.128 = 3; int g.ma.method.132 = MODE_EMA; int g.price.field.136 = 0; double gd.140 = 80.0; double gd.148 = 20.0; bool gi.156 = TRUE; bool gi.160 = FALSE; bool gi.164 = FALSE; bool gi.168 = FALSE; bool gi.172 = FALSE; bool gi.176 = FALSE; double g.ibuf.180[]; double g.ibuf.184[]; double g.ibuf.188[]; double g.ibuf.192[]; double g.ibuf.196[]; double g.ibuf.200[]; int g.timeframe.204; int gia.208[]; int gi.212; int gi.216; string gs.nothing.220 = "nothing"; datetime g.time.228; int init() { SetIndexBuffer(0, g.ibuf.184); SetIndexBuffer(1, g.ibuf.180); SetIndexBuffer(2, g.ibuf.188); SetIndexBuffer(3, g.ibuf.192); SetIndexBuffer(4, g.ibuf.196); SetIndexBuffer(5, g.ibuf.200); if (gi.156) { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_NONE); SetIndexStyle(2, DRAW_HISTOGRAM); SetIndexStyle(3, DRAW_HISTOGRAM); SetIndexStyle(4, DRAW_HISTOGRAM); SetIndexStyle(5, DRAW_HISTOGRAM); SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); } else { SetIndexLabel(0, "FDM Oscillator"); SetIndexLabel(1, "FDM Oscillator"); SetIndexLabel(2, "FDM Oscillator"); SetIndexLabel(3, "FDM Oscillator"); SetIndexLabel(4, "FDM Oscillator"); SetIndexLabel(5, "FDM Oscillator"); SetIndexStyle(0, DRAW_LINE); SetIndexStyle(1, DRAW_LINE); SetIndexStyle(2, DRAW_LINE); SetIndexStyle(3, DRAW_LINE); SetIndexStyle(4, DRAW_NONE); SetIndexStyle(5, DRAW_NONE); gi.124 = MathMax(gi.124, 1); if (gi.124 == 1) { SetIndexStyle(0, DRAW_NONE); SetIndexLabel(0, NULL); } else { SetIndexStyle(0, DRAW_LINE); SetIndexLabel(0, "FDM Signal"); } } g.timeframe.204 = stringToTimeFrame(timeFrame); string ls_0 = "FDM Oscillator (" + TimeFrameToString(g.timeframe.204); IndicatorShortName(ls_0 + ")"); return (0); } int deinit() { DeleteArrows(); return (0); } int start() { int l.ind_counted_0 = IndicatorCounted(); if (l.ind_counted_0 < 0) return (-1); int li_4 = MathMax(Bars - l.ind_counted_0, g.timeframe.204 / Period()); ArrayCopySeries(gia.208, 5, NULL, g.timeframe.204); int l.index_8 = 0; int l.shift.12 = 0; while (l.index_8 < li_4) { if (Time[l.index_8] < gia.208[l.shift.12]) l.shift.12++; g.ibuf.180[l.index_8] = iStochastic(NULL, g.timeframe.204, g.period.120, gi.124, g.slowing.128, g.ma.method.132, g.price.field.136, MODE_MAIN, l.shift.12); g.ibuf.184[l.index_8] = iStochastic(NULL, g.timeframe.204, g.period.120, gi.124, g.slowing.128, g.ma.method.132, g.price.field.136, MODE_SIGNAL, l.shift.12); l.index_8++; } l.index_8 = li_4; l.shift.12 = 0; while (l.index_8 >= 0) { if (gi.156) { g.ibuf.188[l.index_8] = EMPTY_VALUE; g.ibuf.192[l.index_8] = EMPTY_VALUE; if (g.ibuf.180[l.index_8] > gd.140) g.ibuf.188[l.index_8] = 100; else { if (g.ibuf.180[l.index_8] < gd.148) g.ibuf.192[l.index_8] = 100; else { if (g.ibuf.180[l.index_8] > g.ibuf.180[l.index_8 + 1]) g.ibuf.196[l.index_8] = 100; else { if (g.ibuf.180[l.index_8] < g.ibuf.180[l.index_8 + 1]) g.ibuf.200[l.index_8] = 100; else { g.ibuf.196[l.index_8] = g.ibuf.196[l.index_8 + 1]; g.ibuf.200[l.index_8] = g.ibuf.200[l.index_8 + 1]; } } } } } else { if (g.ibuf.180[l.index_8] > gd.140) { g.ibuf.188[l.index_8] = g.ibuf.180[l.index_8]; g.ibuf.188[l.index_8 + 1] = g.ibuf.180[l.index_8 + 1]; } else { g.ibuf.188[l.index_8] = EMPTY_VALUE; if (g.ibuf.188[l.index_8 + 2] == EMPTY_VALUE) g.ibuf.188[l.index_8 + 1] = EMPTY_VALUE; } if (g.ibuf.180[l.index_8] < gd.148) { g.ibuf.192[l.index_8] = g.ibuf.180[l.index_8]; g.ibuf.192[l.index_8 + 1] = g.ibuf.180[l.index_8 + 1]; } else { g.ibuf.192[l.index_8] = EMPTY_VALUE; if (g.ibuf.192[l.index_8 + 2] == EMPTY_VALUE) g.ibuf.192[l.index_8 + 1] = EMPTY_VALUE; } } l.index_8--; } DeleteArrows(); if (gi.160) { gi.216 = MathCeil(iATR(NULL, 0, 50, 0) / Point); for (l.index_8 = 0; l.index_8 < WindowBarsPerChart(); l.index_8++) { if (g.ibuf.180[l.index_8] > gd.140 && g.ibuf.180[l.index_8 + 1] < gd.140) DrawArrow(l.index_8, "up"); if (g.ibuf.180[l.index_8] < gd.148 && g.ibuf.180[l.index_8 + 1] > gd.148) DrawArrow(l.index_8, "down"); } } if (gi.164) { if (g.ibuf.180[0] > gd.140 && g.ibuf.180[1] < gd.140) doAlert(gd.140 + " line crossed up"); if (g.ibuf.180[0] < gd.148 && g.ibuf.180[1] > gd.148) doAlert(gd.140 + " line crossed down"); } return (0); } void DrawArrow(int ai_0, string as_4) { gi.212++; string l.str_concat.12 = StringConcatenate("FDM Signal", gi.212); ObjectCreate(l.str_concat.12, OBJ_ARROW, 0, Time[ai_0], 0); if (as_4 == "up") { ObjectSet(l.str_concat.12, OBJPROP_PRICE1, High[ai_0] + gi.216 * Point); ObjectSet(l.str_concat.12, OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN); ObjectSet(l.str_concat.12, OBJPROP_COLOR, Red); return; } ObjectSet(l.str_concat.12, OBJPROP_PRICE1, Low[ai_0] - gi.216 * Point); ObjectSet(l.str_concat.12, OBJPROP_ARROWCODE, SYMBOL_ARROWUP); ObjectSet(l.str_concat.12, OBJPROP_COLOR, LimeGreen); } void DeleteArrows() { while (gi.212 > 0) { ObjectDelete(StringConcatenate("FDM Signal", gi.212)); gi.212--; } } void doAlert(string as_0) { string l.str_concat_8; if (gs.nothing.220 != as_0 || g.time.228 != Time[0]) { gs.nothing.220 = as_0; g.time.228 = Time[0]; l.str_concat_8 = StringConcatenate(Symbol(), " at ", TimeToStr(TimeLocal(), TIME_SECONDS), " FDM Oscillator ", as_0); if (gi.168) Alert(l.str_concat_8); if (gi.172) PlaySound("alert2.wav"); if (gi.176) SendMail(StringConcatenate(Symbol(), " FDM Oscillator crossing"), l.str_concat_8); } } int stringToTimeFrame(string as_0) { int l.timeframe_8 = 0; as_0 = StringUpperCase(as_0); if (as_0 == "M1" || as_0 == "1") l.timeframe_8 = 1; if (as_0 == "M5" || as_0 == "5") l.timeframe_8 = 5; if (as_0 == "M15" || as_0 == "15") l.timeframe_8 = 15; if (as_0 == "M30" || as_0 == "30") l.timeframe_8 = 30; if (as_0 == "H1" || as_0 == "60") l.timeframe_8 = 60; if (as_0 == "H4" || as_0 == "240") l.timeframe_8 = 240; if (as_0 == "D1" || as_0 == "1440") l.timeframe_8 = 1440; if (as_0 == "W1" || as_0 == "10080") l.timeframe_8 = 10080; if (as_0 == "MN" || as_0 == "43200") l.timeframe_8 = 43200; if (l.timeframe_8 < Period()) l.timeframe_8 = Period(); return (l.timeframe_8); } string TimeFrameToString(int ai_0) { string ls_ret_4 = "Current time frame"; switch (ai_0) { case 1: ls_ret_4 = "M1"; break; case 5: ls_ret_4 = "M5"; break; case 15: ls_ret_4 = "M15"; break; case 30: ls_ret_4 = "M30"; break; case 60: ls_ret_4 = "H1"; break; case 240: ls_ret_4 = "H4"; break; case 1440: ls_ret_4 = "D1"; break; case 10080: ls_ret_4 = "W1"; break; case 43200: ls_ret_4 = "MN1"; } return (ls_ret_4); } string StringUpperCase(string as_0) { int li.20; string ls_ret_8 = as_0; for (int li.16 = StringLen(as_0) - 1; li.16 >= 0; li.16--) { li.20 = StringGetChar(ls_ret_8, li.16); if ((li.20 > '`' && li.20 < '{') || (li.20 > 'ß' && li.20 < 256)) ls_ret_8 = StringSetChar(ls_ret_8, li.16, li.20 - 32); else if (li.20 > -33 && li.20 < 0) ls_ret_8 = StringSetChar(ls_ret_8, li.16, li.20 + 224); } return (0); }
    Modifié le 2013-09-12 09:47:21 par furynick
  • alixbis

    Il est trop fort ce furinick, sérieux
  • nobrick

    Oui il est baleze ! C'est The Programmateur or Forexagone !
  • alixbis — en réponse à alixbis dans son message #81583

    alixbis, le 12/09/2013 dit :
    Il est trop fort ce furinick, sérieux

    Par contre franchement vous le trouvez efficace cet indicateur?
  • furynick — en réponse à nobrick dans son message #81585

    nobrick, le 12/09/2013 dit :
    Oui il est baleze ! C'est The Programmateur or Forexagone !


    Je vais rougir :)
  • nobrick

    rendons à César ce qui appartient à César ..! ;)