Hi,
a guy named Michael Turner invented a stop loss strategy on weekly basis. In his book he says:
HV = (52 week high - 52 week low)
---------------------------------------
Average( 52 week high + 52 week low)
EM = StockPrice x HV x ( SqrRoot(5)/SqrRoot(252))
StopLoss for Long Positions = PreviousWeek's lowest low - EM
I've tried different ways but didn't get a reasonable result.
I need a suggestion for coding.
Thanks and regards
Dieter
Size:
Color:
Hi,
First thing that comes to mind, HV is not the difference between 52 week high and low. The
HV indicator is the historical volatility i.e. the standard deviation of the logarithm of the price ratio.
Perhaps I haven't searched hard enough but I couldn't find sources and examples. Maybe you're more lucky?
Size:
Color:
FWIW
CODE:
Please log in to see this code.
Size:
Color:
Thank You, Eugene!
This seems to be the solution.
Regards
Dieter
Size:
Color:
Dieter, was glad to help you!
Size:
Color: