There's not an easy answer to this, because creating melodies is an art. You can try humming the melody, or try to hear it in your head and then recreate it in the tracker. This is easier than it sounds, though.
Another way to do it would be to create a chord sequence first and base your melody line on the underlying chords. So, if you have a C major chord and the current key of your song is C major also, the obvious notes to choose for your melody line would be C (the root note), G (the fifth) and E (the major third) (in that order) of which the chord is made up. These will always sound good. Next up would be the pentatonic notes of C major, which in this case would D and A. Then, you could use the notes B and F, which are part of the key of C major, but they will clash with the notes in the C major chord, so you (usually) want to use them as short notes in between, or leading up to other notes. Finally, the remaining notes (C#, D#, etc) could be used, but they will sound dissonant. Still there are situations where such notes could sound very cool, if you know what you are doing.
Think about whether you want to use "steps" or "skips". A step are two subsequent notes that are close to eachother, for example, C-D, or C-B. A skip is a bigger leap in melody, for example C-G. Usually, a good melody will consist of a mix of steps and skips.
Where does your melody go? Sometimes it can be a good idea to start with the last note, and works backwards. For example, if your chord sequence is C-Am-F-G-C, you might want to end the melody on a C note on the last C chord, so how will you get there? Working this way can give a refreshing perspective in things.
Also consider the rhythm of your melody. Does your melody start on the first beat of a pattern? That's fine, but also a little cheesy. Try starting the melody a beat earlier or later, or have a little run in the previous patternbar or leading up to the first note. Also, a note-off, or a pause of one or two beats, can create some breathing space in your melody line.
Finally, adorn your melody with some glissando's, vibrato and other effects!