Need an algo code for expert advisor for this strategy

Simple Moving average of 30 and 50 should be a crossover, if crossover happens and 30 goes above 50 then buy and vice versa.
also, RSI (24) should be above 50 for a buy and below 50 for a sell.

Could i please get a code for the above two conditions?

Hi, this code, doesnt really seem, to be the one, i can edit the close values, but am a lil confused, if the crossover will go right, could u please confirm. also RSI needs to be of 24 value.