I've decided to use normals, as they are perpendicular to the direction of the line, so from them you can read the direction of the line:
Above red and blue vectors (arrows) mark the rising line, while cyan and violet vectors mark the falling line. Problem is, those are the normals of the faces that aren't actually visible by the camera - the camera only sees faces facing the camera, which all point in one direction:
Fortunately, by enabling Smooth Shading in Skin modifier, you can make those information bleed to the front and back faces:
Smooth shading is effectively faking more geometry - we could achieve a similar effect using Subdivision Surface modifier, so let's do that (and disable smooth shading for the time being):
In this case it should be apparent that the visible part of the shape no longer faces just one direction - because the geometry is smoothed. A single level of subdivision surface actually completely eliminates faces parallel to the camera.
Now, by separating XYZ, we can separately investigate Y:
From that we can see that the top half of the curve always has positive (approaching white) Y component of the normal, while the bottom half of the curve always has negative (clamped to black) component.
...And separately investigate X:
When the top part is rising, it has negative (black) X component, which gets positive (white) when it falls. For the bottom part it's the opposite. Our logic can therefore be:
If Y > 0: [top]
- if X < 0: green [rising]
- if X > 0: red [falling]
If Y < 0: [bottom]
- if X < 0: red [falling]
- if X > 0: green [rising]
Or in the nodes language: