Thanks for the help in advance.
I am attaching debuglib with just TradeExitControl and the defenitions it is dependant on. You will have to run Ensure_StkExTrades to create the table. The master table for the table created by Ensure_StkExTrades ( StkExTrades) is StkEnTrades. I am attaching a copy of StkEnTrades with just one record.
Hope this wont eat up much of your time,