[MT4指标]H_Bulls_n_Bears震荡指标
主图指标mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| This has been coded by MT-Coder |
//| |
//| Email: [email protected] |
//| Website: mt-coder.110mb.com |
//| |
//| For a price I can code for you any strategy you have in mind |
//| into EA, I can code any indicator you have in mind |
//| |
//| Don't hesitate to contact me at [email protected] |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| This indicator trys to indentify the dominanting power in |
//| the market. |
//+------------------------------------------------------------------+
#property copyright "Copyright ? 2009, MT-Coder."
#property link "http://mt-coder.110mb.com/"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 White
//---- input parameters
extern int HBBPeriod=500;
extern int PeriodOne=2;
extern int PeriodTwo=7;
//---- buffers
double MainBuffer;
double TempBuffer;
double TempBufferTwo;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- 1 additional buffer used for counting.
IndicatorBuffers(3);
IndicatorDigits(Digits);
//---- indicator line
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexBuffer(0,MainBuffer);
SetIndexBuffer(1,TempBuffer);
SetIndexBuffer(2,TempBufferTwo);
//---- name for DataWindow and indicator subwindow label
short_name="H Bulls n Bears by MT-Coder("+PeriodOne+","+PeriodTwo+")";
IndicatorShortName(short_name);
SetIndexLabel(0,"PeriodOne");
SetIndexLabel(1,"PeriodTwo");
//----
SetIndexDrawBegin(0,HBBPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| H Bulls n Bears |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
if(Bars<=HBBPeriod) return(0);
//----
int limit=Bars-counted_bars;
if(counted_bars>0) limit++;
for(i=0; i0) limito++;
for(i=0; i=HBBPeriod) i=Bars-counted_bars-1;
while(i>=0)
{
MainBuffer=(TempBuffer / TempBufferTwo)-1;
//another version
//MainBuffer=MathPow(TempBuffer[i+PeriodOne],5)/MathPow(TempBuffer[i+PeriodTwo],5);
i--;
}
return(0);
}
//+------------------------------------------------------------------+H_Bulls_n_Bears.jpg
发表于:2015-02-10 13:44只看该作者
2楼
到底好用不好用
韬客社区www.talkfx.co
发表于:2015-05-26 03:37只看该作者
3楼
好东西赞一个。
韬客社区www.talkfx.co