Of late was trying to code Signals based on ; Cycle /Noise/Phase/Etc not on any predifined Period but exclusively on 'Random No Generator',so that it can be Tested on past data.The excersice was to get an edge on 'Y' axis (Time).
WHEN is very elusive.
Unable to do so till now.Posting a chart for your perusal.