Line A and B will set a Up tick flag to 1 in [241].
Line C and D will reset the flag to 0 on a down tick.
Line E remembers this tick for comparison on the next pass through.
Line E will initialize the paint can to green, but Line F will optionally change it to orange if the directional flag [241] is 0 for a down tick.
Line G puts on the price label in a larger font using the color in the paint can which is green or orange.