Excessive commissions trading dividend adjusted stocks

I'm having a problem with excessive commissions when backtesting my strategy on dividend adjusted stocks. Historical stock prices can become very small after the dividend adjustment and the number of shares traded becomes very large. The large number of shares is increasing the commissions far above what would have been charged in real life trading.

My strategy uses this afl snippet to model the Interactive Brokers 1/2 cent per share commissions :

SetOption("CommissionMode", 3);
SetOption("CommissionAmount", 0.005);

It works as expected in most cases, but not for extreme price shrinkage after dividend adjustment. I expect other people may have encountered the same problem. How are other people working around the excessive commission problem? Any suggestions?

@Steve perhaps use CommissionMode 1 - percent of trade. You can estimate what the approximate %value of commissions is on your trades in the current market and use the % mode for your backtesting.

Alternatively if your data source permits using the "Original" price (as for example Norgate Data) then you could backtest using the actual original price. Here you can see an example adjusted for splits and dividends vs the actual closing price at that time.

@portfoliobuilder Thank you for the suggestions. I examined the distribution of commissions for my strategy when trading with Original price. Then I used the commission table to closely approximate the same distribution of commissions when using dividend-adjusted price. The commission table is extremely flexible. It allows combinations of multiple commission methods simultaneously with a maximum so the commission will not explode for low-priced stocks.