package com.strategyquant.extend.TradeListColumns;

import com.strategyquant.lib.databank.TradeListColumn;
import com.strategyquant.lib.language.L;
import com.strategyquant.lib.results.SQOrder;

public class StopLoss extends TradeListColumn {
    
	public StopLoss() {
		super();
		
		setName(L.t("Stop Loss"));		
		setWidth(60);
	}

	@Override
	public Object getValue(SQOrder order, String plType) {
		return order.StopLoss;
	}
	
	@Override
	public String displayString(SQOrder order, String plType) {
		double sl = (Double)getValue(order, plType);
		
		return decimalFormat(sl, 5);
	}
}