There are 2 factors in determining the quality of a Spell and whether it will be Fair, Good, Great, or Masterful:

Speed

Accuracy

The pointer starts moving left across the bar as soon as your finger touches the screen. The faster you complete the Spell Glyph, the higher quality the Spell Trace is likely to be.