Trade statistics panel & SL TP Lines

 
Any ideas of how to implement a trade statistic panel based on sl and tp?  I want to add sl and tp lines on some indicators with the stats of win loss based on the sl and tp.