BTC USD 84,391.4 Gold USD 4,298.43
Time now: Jun 1, 12:00 AM

Mencari scrip atau indicator yang bagi alert email bila close post

hurairah01

Permanently Banned - Multiple ID
Messages
8,979
Joined
Jun 12, 2008
Messages
8,979
Reaction score
21
Points
65
Salam sumer,

Ambe tengah mencari srip/ indi / ea yang boleh bagi email alert bila post dah close (tak kira la cecah TP / cecah SL.

Harap kekawan leh bantu ye. :D
 
Salam sumer,

Ambe tengah mencari srip/ indi / ea yang boleh bagi email alert bila post dah close (tak kira la cecah TP / cecah SL.

Harap kekawan leh bantu ye. :D

jumpa kat website jiran...entah boleh guna ke tak :D


//+------------------------------------------------------------------+
//| MailAlertOnOrderClose.mq4 |
//| [email protected] |
//| |
//+------------------------------------------------------------------+
//Based on Nicholishen's original alerter EA at
//http://www.forex-tsd.com/metatrader-4/1125-code-send-email-alerts-when-closed-trades.html
//

int k;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
for(int i=0;i<1000;i++){
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)){
if(OrderSymbol()==Symbol() ){
k++;
**
**else{
break;
**
**
Comment("Init() Trades Count = ",k);
return(0);
**
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
**
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----

int f =0;
for(int i=0;i<10000;i++){
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)){
if(OrderSymbol()==Symbol() /*&& OrderMagicNumber()==MAGICMA && OrderComment() ==Cmt(Period())*/ ){
f++;

**
**else{
break;
**
**
Comment(" Trades in History ",f," Init cnt ",k );
if(k < f){
string ordertyp;

OrderSelect(f,SELECT_BY_POS,MODE_HISTORY);
double x=OrderOpenPrice(),y=OrderClosePrice(),pips;
pips =y - x;
pips =pips * 10000;
if(pips < 0)pips = - pips;
if(OrderType()==0)ordertyp="BUY";
if(OrderType()==1)ordertyp="SELL";
SendMail("CLOSE pr: "+DoubleToStr(OrderProfit(),2)+", bal: "+DoubleToStr(AccountBalance(),2)+", eq: "+DoubleToStr(AccountEquity(),2)+"",
"Symbol: "+Symbol()+" "+ordertyp+" "+OrderMagicNumber()+" \n"+
"Comment: "+OrderComment()+" \n"+
"Ticket#: "+OrderTicket()+" \n"+
"Size: "+DoubleToStr(OrderLots(),2)+" \n"+
"OpenTime: "+TimeToStr(OrderOpenTime())+" \n"+
"Close Time: "+TimeToStr(OrderCloseTime())+" \n"+
"Open: "+DoubleToStr(OrderOpenPrice(),5)+" \n"+
"Close: "+DoubleToStr(OrderClosePrice(),5)+" \n"+
"Profit: "+DoubleToStr(OrderProfit(),2)+" \n"+
"Pips: "+DoubleToStr(pips,1)+" \n\n"+

"Balance: "+DoubleToStr(AccountBalance(),2)+" \n"+
"Used Margin: "+DoubleToStr(AccountMargin(),2)+" \n"+
"Free Margin: "+DoubleToStr(AccountFreeMargin(),2)+" \n"+
"Equity: "+DoubleToStr(AccountEquity(),2)+" \n"+
"Open Orders: "+DoubleToStr(OrdersTotal(),0)+" \n\n"+

"Broker: "+AccountCompany()+" \n"+
"Leverage: "+AccountLeverage()+"" );

k++;
**
return;
**


//----

//+------------------------------------------------------------------+
 
jumpa kat website jiran...entah boleh guna ke tak :D


//+------------------------------------------------------------------+
//| MailAlertOnOrderClose.mq4 |
//| [email protected] |
//| |
//+------------------------------------------------------------------+
//Based on Nicholishen's original alerter EA at
//http://www.forex-tsd.com/metatrader-4/1125-code-send-email-alerts-when-closed-trades.html
//

int k;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
for(int i=0;i<1000;i++){
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)){
if(OrderSymbol()==Symbol() ){
k++;
**
**else{
break;
**
**
Comment("Init() Trades Count = ",k);
return(0);
**
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
**
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----

int f =0;
for(int i=0;i<10000;i++){
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)){
if(OrderSymbol()==Symbol() /*&& OrderMagicNumber()==MAGICMA && OrderComment() ==Cmt(Period())*/ ){
f++;

**
**else{
break;
**
**
Comment(" Trades in History ",f," Init cnt ",k );
if(k < f){
string ordertyp;

OrderSelect(f,SELECT_BY_POS,MODE_HISTORY);
double x=OrderOpenPrice(),y=OrderClosePrice(),pips;
pips =y - x;
pips =pips * 10000;
if(pips < 0)pips = - pips;
if(OrderType()==0)ordertyp="BUY";
if(OrderType()==1)ordertyp="SELL";
SendMail("CLOSE pr: "+DoubleToStr(OrderProfit(),2)+", bal: "+DoubleToStr(AccountBalance(),2)+", eq: "+DoubleToStr(AccountEquity(),2)+"",
"Symbol: "+Symbol()+" "+ordertyp+" "+OrderMagicNumber()+" \n"+
"Comment: "+OrderComment()+" \n"+
"Ticket#: "+OrderTicket()+" \n"+
"Size: "+DoubleToStr(OrderLots(),2)+" \n"+
"OpenTime: "+TimeToStr(OrderOpenTime())+" \n"+
"Close Time: "+TimeToStr(OrderCloseTime())+" \n"+
"Open: "+DoubleToStr(OrderOpenPrice(),5)+" \n"+
"Close: "+DoubleToStr(OrderClosePrice(),5)+" \n"+
"Profit: "+DoubleToStr(OrderProfit(),2)+" \n"+
"Pips: "+DoubleToStr(pips,1)+" \n\n"+

"Balance: "+DoubleToStr(AccountBalance(),2)+" \n"+
"Used Margin: "+DoubleToStr(AccountMargin(),2)+" \n"+
"Free Margin: "+DoubleToStr(AccountFreeMargin(),2)+" \n"+
"Equity: "+DoubleToStr(AccountEquity(),2)+" \n"+
"Open Orders: "+DoubleToStr(OrdersTotal(),0)+" \n\n"+

"Broker: "+AccountCompany()+" \n"+
"Leverage: "+AccountLeverage()+"" );

k++;
**
return;
**


//----

//+------------------------------------------------------------------+

dapat tuan .mekasih:D
 
dapat tuan .mekasih:D

x reti nk amik la tuan...
passing la kat ambo :(

jogetz.gif
 

Live Forex Chart

Currency
Rates
EUR / USD
1.13765
USD / JPY
158.066
GBP / USD
1.32294
USD / CHF
0.82509
USD / CAD
1.41077
EUR / JPY
179.823
AUD / USD
0.70337
Back
Top
Log in Register