Well, guys.
After yesterday's tests, I have reach a conclussion: The failure is the default flight loaded at FSX startup. This is what leads me to that thought:
Load the default flight at LEMD with Mega Airport scenery on. Make all the preflight, program MCDU, etc. Take off. Landing gear does not retract.
Load the default flight at LEMD with Mega Airport scenery off. Make all the preflight, program MCDU, etc. Take off. Landing gear does not retract.
Load another flight at LEAS default scenery. Make all the preflight, program MCDU, etc. Take off. Landing gear does retract.
Load another flight at EIDW with Mega Airport on. Make all the preflight, program MCDU, etc. Take off. Landing gear does retract.
Load another flight at LEST default scenery. Set the A320 at Take off ready. Take off. Landing gear does retract.
Load another flight at LEMD with Mega Airport scenery on. Set the A320 at Take off ready. Take off. Landing gear does retract.
Exit FSX
Open FSX again.
Load the default flight at LEMD with Mega Airport scenery on. Set the A320 at Take off ready. Take off. Landing gear does not retract.
Load another flight at LEST default scenery. Set the A320 at Take off ready. Take off. Landing gear does retract.
Exit FSX
Open FSX again.
Load a flight at LEMD with Mega Airport scenery on (but not the default flight). Set the A320 at Take off ready. Take off. Landing gear does retract.
Exit FSX
So what do you think? I'm going to make a final test today loading the same situation as the default flight (same airport, same gate, cold&dark....) and see what happen.
If it works, then I'll delete the default flight and start a new flight everytime I take off from Madrid.
Regards!