Försöker skripta Hull Moving Average men får inte till det.
	
		
period:=20
steg1=mult(mov(c,div(period,2),w),2)
steg2=sub(steg1,mov(c,period,w))
steg3=mov(steg2,sqrt(period),w)
Ser någon vad jag gör för fel?
					
			
			
				Calculation
Calculate a Weighted Moving Average with period n / 2 and multiply it by 2
Calculate a Weighted Moving Average for period n and subtract if from step 1
Calculate a Weighted Moving Average with period sqrt(n) using the data from step 2
HMA= WMA(2*WMA(n/2) − WMA(n)),sqrt(n))
	Calculate a Weighted Moving Average with period n / 2 and multiply it by 2
Calculate a Weighted Moving Average for period n and subtract if from step 1
Calculate a Weighted Moving Average with period sqrt(n) using the data from step 2
HMA= WMA(2*WMA(n/2) − WMA(n)),sqrt(n))
steg1=mult(mov(c,div(period,2),w),2)
steg2=sub(steg1,mov(c,period,w))
steg3=mov(steg2,sqrt(period),w)
Ser någon vad jag gör för fel?

							
						
Comment