Dollar cost averaging

Is investing a set amount of money regularly over a period of time. For example investing $300 each month for two years. There is an advantage in investing this way as more is bought when the price is low and less is bought when the price is high which results in a lower average cost and reduces the risk of loss.