Академический Документы
Профессиональный Документы
Культура Документы
mq4 |
//+——————————————————————+
//| Battleplan.mq4 |
//| http://www.metaquotes.net |
//+——————————————————————+
//+——————————————————————+
#property indicator_chart_window
#property indicator_buffers 1
//—- buffers
double Hurst[];
//+——————————————————————+
//+——————————————————————+
int init()
//—- indicators
IndicatorBuffers(1);
SetIndexBuffer(0,Hurst);
SetIndexStyle(0,DRAW_LINE,0,2);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
IndicatorShortName(WindowExpertName());
return(0);
//+——————————————————————+
//+——————————————————————+
int deinit()
//—-
//—-
return(0);
//+——————————————————————+
//+——————————————————————+
int start()
double a,ma,w1,w2,w3,w4,cycle,x,grc,c,b,pi;
int i,limit,phase;
int flag;
flag=1;
if( flag==0) {
Hurst[i]=EMPTY_VALUE;
}
else
a=a+1;
x=(360/cyclelength)*a;
phase=-90;
pi=3.1415926535;
w1=MathSin(((8*x+phase)*pi)/180);
w2=2*MathSin(((4*x+phase)*pi)/180);
w3=3*MathSin(((2*x+phase)*pi)/180);
w4=4*MathSin(((x+phase)*pi)/180);
cycle=(w1+w2+w3+w4);
grc=0.01029;
c=(grc*trend*1);
b=b+c;
Hurst[i]=(cycle+b+10)*((sup-inf)/15)+inf;
return(0);
//+—————————–+
--+