Using the plotDay function, one can differentiate between the most profitable and unprofitable trading days of the month in historical data.

Now, can I setup a variable using tdm function to permit trading on historically profitable days/weeks/months only?