EMA full form is *Exponential moving average*. you can google this for detailed explaination and formula.
I use 30 week EMA for my stoploss that means, the length chosen is last 30 week on weekly timeframe.
if you are using daily timeframe you can use 150 Day EMA (as 5 working days for week * 3o weeks).
NOTE- The length choosen is not an fix and not compulsory...