Three New York-based brokers have reached an agreement with the SEC in a case that involves overcharging clients more than $18 million, the SEC says in a complaint released Tuesday.

U.S. District Court Judge John F. Keenan of the United States District Court for the Southern District of New York entered judgments against Marek Leszczynski, Benjamin Chouchane and Henry Condron for fraud. The three, who worked at a cash desk of a New York-based broker-dealer, have been ordered to pay a total of $4.1 million in penalties and interest for the fraud.

The judge reserved judgment on whether to impose a civil penalty on the defendants pending their continued cooperation with the SEC. The three have consented to the judgments.

The SEC charged the three with illegally overcharging customers $18.7 million by using hidden markups and markdowns and secretly keeping portions of profitable customer trades. The brokers made their scheme difficult for customers to detect because they deceptively charged the markups and markdowns during times of market volatility in order to conceal the fraudulent nature of the prices they were reporting to their customers. The surreptitiously embedded markups and markdowns ranged from a few dollars to $228,000 and involved more than 36,000 transactions during a four-year period, the SEC says.

The SEC also says when a customer placed a limit order seeking to purchase shares at a specified maximum price, the brokers filled the order at the customer’s limit price but used opportune times to sell a portion of that order back to the market to obtain a secret profit for the firm. They falsely reported back to the customer that they could not fill the order at the limit price.