For haplotype analysis of the X chromosome, haplotype-sharing (HS) statistics with sliding windows are defined for males and females separately, which are then combined to a single HS test for the X chromosome. When independent replication samples are not available, the training-testing sets approach is used to validate this procedure and a permutation method is used to obtain its P-value. We applied this method to the X chromosome (with 1804 SNPs) for age-related macular degeneration (AMD). We found a window of five SNPs over a 272 kb region associated with AMD after Bonferroni correction. An examination of the odds ratio and the population attributable risks revealed a disease-preventive haplotype, ATGAC, on these five SNPs. For elderly females without this haplotype, the likelihood of AMD is increased by a factor of 4.75 with a 95% confidence interval (1.43, 15.82). The frequency of ATGAC in HapMap CEU is 0.276. These five SNPs are covered by the gene DIAPH2, which is known to cause premature ovarian failure (POF) in females. Our results indicated that DIAPH2 may be a polygenic pleiotropy for POF and AMD.