Implementing Take profit and Stop Loss

I am currently working with the blueshift demo strategy called "Short_term_reversal_forex.py". I would like to know where I can find resources to implement a take profit and stop loss to this strategy. Any help would be greatly appreciated.

chekout here and here.