Hi, 

a dump qq, is Holdings.UnrealizedProfitPercent gives back the profit (+ve) / loss (-ve) percetage of existing order?

if (Securities[stock.Symbol].Holdings.UnrealizedProfitPercent < -3) // 3% loss margin { Liquidate(stock.Symbol,"3% loss margin reached") }