Trailing stops

 
Is there a way you can set your trailing stop to function in terms of dollar value as against pips?
 
double lossPerLot = MarketInfo( Symbol(), MODE_TICKVALUE );
double newSL = OrderClosePrice() - MaxLossUSD/(lossPerLot * OrderLots());