it's better to declare and define useful variables and methods within the namespace but outside the class TradeMsg namespace. For example:

namespace solution_2_4
{
      namespace detail
      {
                ///your variable and methods
      }
      class TradeMsg
     {
            // something
     };
}

class should have one responsibility.