Fractional Stop Loss

 
Is there script that can set a stop loss to close only a percentage of an open order?  I have a position that I want to hold open but would like to scale out of in the event price action begins to move against me.