the mechanism when creating a sketch works like this :
When you select a face to for the sketch, the normal of that face will become the + Zc of the sketch.( the face normals of a healthy solid is always out from the volume, if invards, the solid is corrupted.)
you will, when or if, the sketch re-orients look down the Zc . ( Zc+ towards you.)
on that solid, the linear edge which is most horizontal and lowest on your screen will be the +Xc of the sketch coordinate system. You can try this by rotating a simple solid slightly to see which edge will be the Reference direction ( + Xc)
When you select a datumplane , that datumplane has a positive normal side and a negative normal side, that vector will show as soon as you have selected it. The positive normal will become the sketch +Zc unless you flip the vector by either double click the arrowhead , or in the menu "reverse".
Also the reference direction can be flipped.
When the placement plane and reference direction ( and if you like the sketch origin) have been defined, NX will rotate the view such that +Xc is to the right and +Zc is towards the user. ( +Yc is then vertical up.)
If you experience that the sketch flips 180 when edited, it is because it is defined 180 flipped.
Regards,
Tomas