https://www.askmrrobot.com/wow/theory/mechanic/function/overloadchance?spec=ShamanElemental&version=live
This seems to be incorrect in two ways.
First of all, the chance of chain lightning to overload per hit is 1/3rd instead of 1/5th the normal overload chance according to many sources (including simc and many high level players). Secondly, the storm totem buff should increase the base overload chance before this 1/3rd division. AMR currently adds a flat 5% overload chance to every single chain lightning hit.
I suggest changing the body of this function to the following:
= MasteryValue(ShamanElementalChance, false)
if HasBuff(StormTotem) and (spellName = LightningBolt or spellName = ChainLightning or spellName = LavaBeam)
= Result + 0.05
if spellName = ChainLightning or spellName = LavaBeam
= Result / 3
if HasBuff(Stormkeeper) and (spellName = LightningBolt or spellName = ChainLightning)
= 1