Trading forex using machine learning

 
Say I have a stop loss and take profit strategy, to label the training set (historical prices) as buy or sell or do nothing, am I right that I need to know whether that historical price would lead to loss or take profit according to the stop loss and take profit strategy, and use that to label the training set?