FX-Event Indicator

 

Dear all,


I found this indicator and it works very well, but I miss two features.

1. After the order is closed by stoploss, I need an additional sound if the order was closed by stoploss but in profit.

2. if the price crosses the breakeven, I want to hear another sound.

I tryed to code this a lot of days, but it doesnt work. Maybey someone can help me in this case. Attached you can find the source


for (l_pos_28 = 0; l_pos_28 < ArraySize(gia_144); l_pos_28++) {
li_40 = FALSE;
for (l_index_36 = 0; l_index_36 < ArraySize(lia_0); l_index_36++)
if (gia_144[l_pos_28] == lia_0[l_index_36]) li_40 = TRUE;
if (!li_40) {
if (gia_152[l_pos_28] == 0) {
if (OrderSelect(gia_144[l_pos_28], SELECT_BY_TICKET)) {
if (ND(OrderClosePrice()) >= ND(OrderTakeProfit()) && ND(OrderTakeProfit()) != 0.0) {
if (MarketTakeProfit) {
if (Show_Alert) Alert(gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed by TakeProfit ");
if (Play_Sound) PlaySound(MarketTakeProfitBuy);
if (Send_Mail) SendMail("Order Event", gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed by TakeProfit ");
}
} else {
if (ND(OrderClosePrice()) <= ND(OrderStopLoss()) && ND(OrderStopLoss()) != 0.0) {
if (MarketStopLoss) {
if (Show_Alert) Alert(gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed by StopLoss ");
if (Play_Sound) PlaySound(MarketStopLossBuy); // <-- Somewhere here???
if (Send_Mail) SendMail("Order Event", gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed by StopLoss ");
}
} else {
if (MarketClose) {
if (Show_Alert) Alert(gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed at " + DS(OrderClosePrice()) + " ");
if (Play_Sound) PlaySound(MarketCloseBuy);
if (Send_Mail) SendMail("Order Event", gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed at " + DS(OrderClosePrice()) + " ($" + DS2(OrderProfit()) + ")");
}
}
}
} else {
if (MarketTakeProfit || MarketStopLoss || MarketClose) {
if (Show_Alert) Alert(gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed (undefined method)");
if (Play_Sound) PlaySound(MarketTakeProfitBuy);
if (Send_Mail) SendMail("Order Event", gsa_148[l_pos_28] + " " + "BUY " + gia_144[l_pos_28] + " closed (undefined method)");
}
}
}

Files:
fx-events.mq4  19 kb
 
sekisback:

I found this indicator [...]

Where? This indicator has been decompiled (= stolen).
 
I guess it was in the ForexFactory Forum and it was open Source mq4