Jump to content

Indicator needs decompiling & Alert added


shabz

Recommended Posts

the indicators is %100 repaint.

 

 

#property indicator_chart_window

#property indicator_buffers 4

#property indicator_color1 Black

#property indicator_color2 Black

#property indicator_color3 Yellow

#property indicator_color4 Yellow

#property indicator_width4 5

#property indicator_width3 5

extern bool Alarm=true;

string SonSinyal="";

extern int FastEMA = 25;

extern int SlowEMA = 170;

extern int RSIPeriod = 14;

extern bool Alerts = true;

double g_ibuf_92[];

double g_ibuf_96[];

double g_ibuf_100[];

double g_ibuf_104[];

int gi_108 = 0;

int gi_112 = 0;

double gd_116 = 0.0;

double gd_unused_124 = 0.0;

 

int init() {

SetIndexStyle(0, DRAW_NONE);

SetIndexBuffer(0, g_ibuf_92);

SetIndexStyle(1, DRAW_NONE);

SetIndexBuffer(1, g_ibuf_96);

SetIndexStyle(2, DRAW_ARROW, STYLE_DASH, 3);

SetIndexArrow(2, 233);

SetIndexBuffer(2, g_ibuf_100);

SetIndexEmptyValue(2, 0.0);

SetIndexStyle(3, DRAW_ARROW, STYLE_DASH, 3);

SetIndexArrow(3, 234);

SetIndexBuffer(3, g_ibuf_104);

SetIndexEmptyValue(3, 0.0);

return (0);

}

 

int deinit() {

return (0);

}

 

int start() {

int li_4 = IndicatorCounted();

double l_irsi_8 = 0;

bool li_16 = FALSE;

double l_price_20 = 0;

if (li_4 < 0) return (-1);

if (li_4 > 0) li_4--;

int li_0 = Bars - li_4;

for (int li_28 = 0; li_28 < li_0; li_28++) {

g_ibuf_92[li_28] = iMA(NULL, 0, FastEMA, 0, MODE_EMA, PRICE_CLOSE, li_28);

g_ibuf_96[li_28] = iMA(NULL, 0, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, li_28);

l_irsi_8 = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, li_28);

gd_116 = g_ibuf_92[li_28] - g_ibuf_96[li_28];

// Comment("pipdiffCurrent = " + gd_116 + " ");

if (gd_116 > 0.0 && l_irsi_8 > 50.0) gi_108 = 1;

else

if (gd_116 < 0.0 && l_irsi_8 < 50.0) gi_108 = 2;

if (gi_108 == 1 && gi_112 == 2) {

g_ibuf_104[li_28 - 1] = High[li_28 - 1] - 5.0 * Point;

li_16 = TRUE;

l_price_20 = Ask;

} else {

if (gi_108 == 2 && gi_112 == 1) {

g_ibuf_100[li_28 - 1] = Low[li_28 - 1] - 5.0 * Point;

li_16 = TRUE;

l_price_20 = Bid;

}

}

gi_112 = gi_108;

gd_unused_124 = gd_116;

}

// Comment(gi_112," SonSinyal ",SonSinyal);

if (Alerts && li_16) {

//PlaySound("alert.wav");Alert(Symbol()," HaskayafxSafe Sinyal");

if (gi_112 == 1) MessageBox("Entry point: buy at " + l_price_20 + "!!", "Entry Point", 0);

else

if (gi_112 == 2) MessageBox("Entry point: sell at " + l_price_20 + "!!", "Entry Point", 0);

li_16 = FALSE;

}

// if (gi_112 == 1 && Alarm && SonSinyal!="BUY") {SonSinyal="BUY";Alert(Symbol()," Haskayafx Safe Bizim BUY");}

//MessageBox("Entry point: buy at " + l_price_20 + "!!", "Entry Point", 0);

 

// if (gi_112 == 2 && Alarm && SonSinyal!="SELL"){SonSinyal="SELL";Alert(Symbol()," Haskayafx Safe Bizim SELL");}

 

// if (Alarm && SonSinyal!="BUY" && g_ibuf_100[0]>g_ibuf_104[0]){SonSinyal="BUY";Alert(Symbol()," Haskayafx Safe Bizim BUY");}

// if (Alarm && SonSinyal!="SELL" && g_ibuf_104[0]>g_ibuf_100[0]){SonSinyal="SELL";Alert(Symbol()," Haskayafx Safe Bizim SELL");}

 

 

//PlaySound("alert.wav");Alert(Symbol()," HaskayafxSafe Sinyal");

 

 

RefreshRates();

// if (gi_112 == 1 && SonSinyal!="BUY" ) {SonSinyal="BUY";Alert(Symbol()," Haskayafx Safe BUY " + l_price_20 );}

 

// if (gi_112 == 2 && SonSinyal!="SELL") {SonSinyal="SELL";Alert(Symbol()," Haskayafx Safe SELL " + l_price_20);}

 

return (0);

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...