good evening

my bike is a Specy HT Carbon 2010

i have a question: i have a FRM 2x9 with 40-27 chainring

as you can see in photo the derailleur (shimano SLX, but with Sram Red is the same) is too high. But if i try to put the derailleur lower, it touches the rear chainstay.

What type of derailleur can i use ? Sram XX ? or Durace ? is possible to see same photos of your derailleur in 40/27 configuration ?