about algorithmic option trading

hello i am kiran trading sience 4 year right now i am profitable but i want algo trading my statergy is " i want entry manually and exit three different points and 40% 30% 30% quantity exit. and stoploss add at that time fix ok when 1st target hit then trail stop loss at entry point. then 2nd target hit then trail stop loss goes first target point and third taget will trail by 50 pts behind it is all is please help to slove it or how to do