[MT4指标]IFish震荡指标
附图指标,IFish震荡指标
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| IFish.mq4 |
//| Kalenzo |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link "[email protected]"
//----
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_level1 0.5
#property indicator_level2 -0.5
//----
double value1;
double value2;
double ifish;
double red;
double green;
double alertBar;
double prev;
double high=0.5;
double low=-0.5;
extern bool SoundON=true;
//----
#property indicator_separate_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(3);
SetIndexBuffer(0,ifish);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(1,value1);
SetIndexBuffer(2,value2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars--;
//----
limit=Bars-counted_bars;
//----
for(int i=0 ;i<=limit ;i++) value1=0.1*(iRSI(Symbol(),0,5,PRICE_CLOSE,i)-50);
for(int j=0 ;j<=limit ;j++) value2[j]=iMAOnArray(value1,0,9,0,MODE_LWMA,j);
for(int f=0 ;f<=limit ;f++) ifish[f]=(MathExp(2*value2[f])-1)/(MathExp(2*value2[f])+1);
//----
if(ifish[f]>=high && prev==0) prev=1;
if(ifish[f]<=low && prev==0) prev=2;
if(SoundON==true && prev==1 && ifish[f]>=high && Bars>alertBar) {Alert("IFISH Hit 0.5 or above exit Buy on ",Symbol()," Period ",Period());alertBar=Bars;prev=2;}
if(SoundON==true && prev==2 && ifish[f]<=low && Bars>alertBar) {Alert("IFISH Hit -0.5 or below exit Sell on ",Symbol()," Period ",Period());alertBar=Bars;prev=1;}
//----
return(0);
}
//+------------------------------------------------------------------+IFish.jpg
发表于:2017-08-16 01:30只看该作者
3楼
阅尽天下指标
韬客社区www.talkfx.co
发表于:2018-02-24 03:38只看该作者
4楼
我今天最想说
韬客社区www.talkfx.co
发表于:2018-02-24 03:39只看该作者
5楼
我今天最想说
韬客社区www.talkfx.co
发表于:2019-01-06 06:42只看该作者
6楼
怎么用
韬客社区www.talkfx.co