Goodmorning,
this is the code written by Wabbit for the hurst's cycle. But now i would start this cycle for an intraday chart on an specific time. I've tried with this input (Hr:=Input("Hours [0-23]",0,23,9);Mn:=Input("Minutes [0-59]",0,59,30);) but it doesn't work.
Thanks for helping me.
gg
This the original code:
****************************************************************************
{coded for WDGIGI, 03 June 2008}
{copyright 2008, Scott Bunny}
D:=Input("Day of month",1,31,1);
M:=Input("Month",1,12,1);
Y:=Input("Year",1900,2100,2008);
Hr:=Input("Hours [0-23]",0,23,9);
Mn:=Input("Minutes [0-59]",0,59,30);
WA2:=3;
wavelength:=Input("Wavelength (bars)",1,9999,243);
{bars}
start:=Cum((DayOfMonth()=D AND Month()=M AND Year()=Y) OR
(DayOfMonth()>=D AND Month()=M AND Year()=Y) OR
(Month()>M AND Year()=Y) OR
Year()>Y)=1;
start:=LastValue(ValueWhen(1,start,Cum(1 )));
{x axis values}
x:=360/wavelength * (Cum(1)-start);
{sine waves}
phase:=-90;
w1:=Sin(8*x+phase);
w2:=2*Sin(4*x+phase);
w3:=wa2*Sin(2*x+phase);
w4:=4*Sin(x+phase);
{hurst cycle}
CYCLE:= (W1+W2+W3+W4);
basso:=LastValue(ValueWhen(1,cycle,Lowest(cycle)));
alto:=LastValue(ValueWhen(1,cycle,Highest(cycle)));
Grc:=(alto-basso)/486;
{plot}
CYCLE;
*****************************************************************************