gsandral
16th March 2007, 02:23 PM
I’m looking to assign a value to “factor” in Metastock, but require the “factor” to change depending on the level volatility experienced, hence I would like to code the following in MetaStock
IF volatility < 1.6 then factor =1
IF volatility > 1.6 and < 2 then factor =1.1
IF volatility > 2.0 then factor = 1.2
Where volatility=ATR(3)/ATR(100)
So factor will be 1.0, 1.1, or 1.2 depending on the level of volatility.
Any help would be appreciated
Regards Graeme
IF volatility < 1.6 then factor =1
IF volatility > 1.6 and < 2 then factor =1.1
IF volatility > 2.0 then factor = 1.2
Where volatility=ATR(3)/ATR(100)
So factor will be 1.0, 1.1, or 1.2 depending on the level of volatility.
Any help would be appreciated
Regards Graeme