@rh6996 Stupid me!!! Yes, i was doing the same. Same formula for Metastock please? Dear Jdutt, I am try this formula but its not working in metastock. Light2001