PII Backtest , Reference of buy script into sell script

Is there a way to to give reference of buy script into sell script.
For e.g.
My Buy script is:

After my Buy signal is generated i want the sell script to be at some percentage point above my buy price and my exit long should be some points below buy price. How can i achieve this?