This script shows how first derivative is calculated from a 'dynamic-perspective'. Normally, you'd use: (close-open)/open x 100%. Unfortunately, i believe experience shows us, this puts you at a disadvantage, since the markets are moving continuously. As per the display, the circles are made black, at 0%, and a smoothed-MA is made as an overlay.