请问哪位高人知道自动停止智能交易且发出警告声的MQL4程序编写的?小生感激不尽!

 
请问哪位高人知道自动停止智能交易且发出警告声的MQL4程序编写的?小生感激不尽!
 

Did you see these functions?

 
XY-CSC 写:
请问哪位高人知道停止智能交易且发出警告声的MQL4程序编写的?小生感激不尽!

关掉电脑或者点击智能交易就可以停止了 ,警报声是你设置智能交易的时候设置的,你不设置就ok 了

 
522171:
XY-CSC 写:
请问哪位高人知道停止智能交易且发出警告声的MQL4程序编写的?小生感激不尽!

关掉电脑或者点击智能交易就可以停止了 ,警报声是你设置智能交易的时候设置的,你不设置就ok 了

谢谢!

 
Rosh:

Did you see these functions?

Rosh Thank you,

automatism stopping EA functions is Sleep(28800000)?

emit admonition voice functions is PlaySound()?

 

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

//| RSIFilter_v1.mq4

//| Copyright ?2006, Forex-TSD.com

//| Written by IgorAD,igorad2003@yahoo.co.uk

//| http://finance.groups.yahoo.com/group/TrendLaboratory

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

#property copyright "Copyright ?2006, Forex-TSD.com "
#property link "https://www.forex-tsd.com/"

#property indicator_separate_window
#property indicator_minimum -2
#property indicator_maximum 2
#property indicator_buffers 2
#property indicator_color1 DeepSkyBlue
#property indicator_color2 Red

//---- input parameters
extern int PeriodRSI=14;
//---- indicator buffers
double UpBuffer[];
double DnBuffer[];
//+------------------------------------------------------------------

//| Custom indicator initialization function

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

int init()
{
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,1);
SetIndexBuffer(0,UpBuffer);
SetIndexBuffer(1,DnBuffer);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
//---- name for DataWindow and indicator subwindow label
short_name="RSI Filter("+PeriodRSI+") (Down trade only when down bars are orange)";
IndicatorShortName(short_name);
SetIndexLabel(0,"UpTrend");
SetIndexLabel(1,"DownTrend");
//----
SetIndexDrawBegin(0,PeriodRSI);
SetIndexDrawBegin(1,PeriodRSI);
//----
return(0);
}

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

//| RSIFilter_v1

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

int start()
{
int shift,trend;
double RSI0;


for(shift=Bars-PeriodRSI-1;shift>=0;shift--)
{
RSI0=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,shift);
//RSI0=iCustom(NULL,0,"LaguerreRSI",PRICE_CLOSE,shift);
if (RSI0>70) trend=1;
if (RSI0<30) trend=-1;

if (trend>0)
{
if (RSI0 > 40) UpBuffer[shift]=1.0;
else UpBuffer[shift] = EMPTY_VALUE;
DnBuffer[shift]=0;
}
if (trend<0)
{
if (RSI0 < 60) DnBuffer[shift]=-1.0;
else DnBuffer[shift] = EMPTY_VALUE;
UpBuffer[shift]=0;
}
}
return(0);
}



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

==================================

請問當這個指標

UpBuffer[shift]=1.0轉成DnBuffer[shift]=-1.0時

Alert("Sell ");

DnBuffer[shift]=-1.0轉成UpBuffer[shift]=1.0時

Alert("Buy");

該如何添加程序

謝謝!!!

==================================

原因: