Scalping in options script

I came across pi ea and wanted to know how to write take profit 2 points above buy price… So buy when ema 8 crosses 13 and exit buy when ltp becomes buy price +2 or ltp becomes buy minus 4… Is this possible?

In tradescript it can be coded based on OHLC condition and not possible based on buy price script as per above condition

Can you give an example of any scalping scripts, if any? Thanks