Macadam, 20, has been an ever-present with the Robins this season, making 20 appearances.
The former Burnley youngster pens a professional contract with the League One club on a two and a half year deal.
Moving in the other direction is Fleetwood midfielder Ben Thompson, who has joined Ashton on an initial one-month loan.
Meanwhile, FC United have confirmed that defender Drew Baker is departing the club to make a Football League move.
Keep up-to-date with our exclusive email newsletters.
Subscribe