Grid trading is setting pending orders x pips above or below your position, and opening positions at regular intervals. Martingale trading is increasing your position size everytime you make a loss in order to come out with profit in the end. With grid trading, you may mitigate risk by hedging your positions ie, opening up positions in the opposite direction in order to lower your risk and exposure, whereas with martingale, you focus on making each open position a winner, by increasing position size after each loss, in order to come out a net winner.