hi uys have this indi .....not working if anyone cud fix it...

indi_hunter

Trader
Apr 14, 2011
1
0
12
MQL4:
//
#property copyright "Copyright © 2011 fxpreislevels.com."
#property link      "http://www.fxpreislevels.com"
 
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 White
#property indicator_color2 White
#property indicator_color3 White
#property indicator_color4 White
#property indicator_color5 White
#property indicator_color6 White
#property indicator_color7 White
 
#import "_fx_preis_levels_v4.dll"
   string VCh0(int a0);
   string VCh1(int a0);
   string VCh2(int a0);
   string VCh3(int a0);
   bool xFNN0(int a0);
   double xFNN1(int a0, double a1, double a2, double a3, double a4);
   double xFNN2(int a0, double a1, double a2, double a3, double a4);
   double xFNN3(int a0, double a1, double a2, double a3, double a4);
   double xFNN4(int a0, double a1, double a2, double a3, double a4);
#import
 
extern bool TRADE_CALCULATOR = TRUE;
extern string Pair = "EURUSD";
extern double Entry_Price = 1.2755;
extern double Stop_Loss = 1.2701;
extern double Take_Profit = 1.2855;
extern double Trade_Risk_Percent = 2.0;
extern bool Market_Order = TRUE;
extern string Market_Order_Type = "B";
extern string Market_Order_StopLoss = "A25";
extern string Market_Order_TakeProfit = "A50";
extern string PERIODS = "";
extern int M1 = 4;
extern int M5 = 4;
extern int M15 = 4;
extern int M30 = 4;
extern int H1 = 4;
extern int H4 = 4;
extern int D1 = 4;
extern int W1 = 4;
extern int MN = 4;
extern int PriceFluctuations_Green = 20;
extern int PriceFluctuations_Red = 20;
extern string LEVELS = "";
extern int M1_L1 = 10;
extern int M1_L2 = 25;
extern int M1_L3 = 40;
extern int M5_L1 = 30;
extern int M5_L2 = 70;
extern int M5_L3 = 100;
extern int M15_L1 = 70;
extern int M15_L2 = 140;
extern int M15_L3 = 210;
extern int M30_L1 = 70;
extern int M30_L2 = 140;
extern int M30_L3 = 210;
extern int H1_L1 = 70;
extern int H1_L2 = 140;
extern int H1_L3 = 210;
extern int H4_L1 = 80;
extern int H4_L2 = 160;
extern int H4_L3 = 250;
extern int D1_L1 = 150;
extern int D1_L2 = 250;
extern int D1_L3 = 400;
extern int W1_L1 = 300;
extern int W1_L2 = 550;
extern int W1_L3 = 800;
extern int MN_L1 = 700;
extern int MN_L2 = 1400;
extern int MN_L3 = 2100;
extern string STYLE = "";
extern bool Ask_Bid = TRUE;
extern bool Mtf_Trends = TRUE;
extern bool Price_Fluctuations = TRUE;
extern int Periods = 1000;
extern color Uptrend_Band = C'0x00,0x28,0x00';
extern color Middle_Band = C'0x00,0x14,0x64';
extern color Downtrend_Band = C'0x64,0x00,0x00';
double g_ibuf_352[];
double g_ibuf_356[];
double g_ibuf_360[];
double g_ibuf_364[];
double g_ibuf_368[];
double g_ibuf_372[];
double g_ibuf_376[];
int gi_unused_380 = 12632256;
int gi_unused_384 = 12632256;
int gi_unused_388 = 65280;
int gi_unused_392 = 255;
int gi_unused_396 = 9;
int gi_unused_400 = 28;
int gi_unused_404 = 18;
int gi_unused_408 = 12;
int gi_unused_412 = 10;
int gi_unused_416 = 7;
int gi_unused_420 = 221;
int gi_unused_424 = 222;
int gi_unused_428 = 220;
int gi_432 = 5;
int gi_436 = 5;
int gi_440;
 
int init() {
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexStyle(2, DRAW_LINE, STYLE_DOT, 1);
   SetIndexStyle(3, DRAW_LINE, STYLE_DOT, 1);
   SetIndexStyle(4, DRAW_LINE, STYLE_DOT, 1);
   SetIndexStyle(5, DRAW_LINE, STYLE_DOT, 1);
   SetIndexStyle(6, DRAW_NONE);
   SetIndexBuffer(0, g_ibuf_352);
   SetIndexBuffer(1, g_ibuf_356);
   SetIndexBuffer(2, g_ibuf_360);
   SetIndexBuffer(3, g_ibuf_364);
   SetIndexBuffer(4, g_ibuf_368);
   SetIndexBuffer(5, g_ibuf_372);
   SetIndexBuffer(6, g_ibuf_376);
   IndicatorShortName("FX Preis Levels");
   return (0);
}
 
int deinit() {
   f0_1();
   return (0);
}
 
int start() {
   int li_0;
   int li_4;
   double ld_12;
   double ld_20;
   double ld_28;
   double ld_36;
   if (f0_0()) {
      f0_2("XY000", " ", 200, 30, Silver, "Tahoma Narrow", 32);
      f0_2("XY001", VCh0(AccountNumber()), 5, 110, Red, "Tahoma Narrow", 22, 3);
      f0_2("XY002", VCh1(AccountNumber()), 5, 70, Lime, "Tahoma Narrow", 18, 3);
      f0_2("XY003", VCh2(AccountNumber()), 5, 40, Lime, "Tahoma Narrow", 18, 3);
      f0_2("XY004", VCh3(AccountNumber()), 5, 10, White, "Tahoma Narrow", 18, 3);
      li_4 = IndicatorCounted();
      if (li_4 > 0) li_4--;
      li_0 = Bars - li_4;
      for (int index_8 = 0; index_8 < li_0; index_8++) {
         ld_12 = xFNN1(AccountNumber(), Open[index_8], Close[index_8], High[index_8], Low[index_8]);
         ld_20 = xFNN2(AccountNumber(), Open[index_8], Close[index_8], High[index_8], Low[index_8]);
         ld_28 = xFNN3(AccountNumber(), Open[index_8], Close[index_8], High[index_8], Low[index_8]);
         ld_36 = xFNN4(AccountNumber(), Open[index_8], Close[index_8], High[index_8], Low[index_8]);
         g_ibuf_352[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 0, index_8);
         g_ibuf_356[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 1, index_8);
         g_ibuf_360[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 2, index_8);
         g_ibuf_364[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 3, index_8);
         g_ibuf_368[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 4, index_8);
         g_ibuf_372[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 5, index_8);
         g_ibuf_376[index_8] = iCustom(NULL, 0, "~FX_PREIS_LEVELS_V40", ld_12, ld_20, ld_28, ld_36, gi_440, gi_436, gi_432, 6, index_8);
      }
   }
   return (0);
}
 
void f0_2(string as_0, string a_text_8, int ai_16, int ai_20, color a_color_24, string a_fontname_28 = "Arial", int a_fontsize_36 = 12, int a_corner_40 = 1) {
   int li_44 = 5;
   int li_48 = 5;
   string name_52 = "FPL1_" + as_0;
   if (ObjectFind(name_52) == -1) ObjectCreate(name_52, OBJ_LABEL, 0, 0, 0);
   ObjectSet(name_52, OBJPROP_CORNER, a_corner_40);
   ObjectSet(name_52, OBJPROP_XDISTANCE, li_44 + ai_16);
   ObjectSet(name_52, OBJPROP_YDISTANCE, li_48 + ai_20);
   ObjectSetText(name_52, a_text_8, a_fontsize_36, a_fontname_28, a_color_24);
}
 
bool f0_0() {
   f0_2("XY000", "Authorization...", 20, 30, Silver, "Tahoma Narrow", 32, 1);
   Sleep(2000);
   if (xFNN0(AccountNumber())) return (TRUE);
   return (FALSE);
}
 
void f0_1() {
   for (int li_0 = 0; li_0 < ObjectsTotal(); li_0++) {
      if (StringFind(ObjectName(li_0), "FPL1_") == 0) {
         ObjectDelete(ObjectName(li_0));
         li_0--;
      }
   }
}
 
Last edited by a moderator:

Enivid

Administrator
Staff member
Nov 30, 2008
18,605
1,366
144
Odesa
www.earnforex.com
First, please use MQL4 syntax highlighting when posting such pieces of code. I've already corrected that for you.

Second, the code you've posted looks like it has been decompiled from ex4 file. In case it is a code of some proprietary copyrighted indicator, it is illegal to share its decompiled code and is forbidden by the forum rules. So I assume it is not ;-).

Third, the code requires a file called "_fx_preis_levels_v4.dll" to run.
 

PaladinFX

Active Trader
Nov 21, 2012
76
0
27
Germany
www.paladin-consultants.com
Second, the code you've posted looks like it has been decompiled from ex4 file. In case it is a code of some proprietary copyrighted indicator, it is illegal to share its decompiled code and is forbidden by the forum rules. So I assume it is not ;-).

lol, I like that ... in dubio pro re. :)