An ad hoc grid is a spontaneous formation of cooperating heterogenous computing nodes which attempts to provide computing resources on demand to every participant. In this paper, we study market formulation for resource allocation in an ad-hoc Grid. Continuous Double Auction (CDA) protocol with discriminatory pricing policy is selected as the market protocol and a novel bidding mechanism is presented to determine ask/bid prices. We study the performance of our bidding mechanism and compare it with three other mechanisms from the literature. The performances are investigated in the terms of price stability, throughput, and load balancing. The experimental results show that our mechanism outperforms other bidding mechanisms in similar conditions.