to create mt4 code
Try reading the tutorial articles and learning about the language some. I've included the links to all the pages that you need to construct the code for yourself.
https://docs.mql4.com/trading/OrderSend
https://docs.mql4.com/indicators/iMA
https://docs.mql4.com/indicators/iMACD
https://docs.mql4.com/indicators/iRSI
Your question is also a little vague as you don't specify the parameters for your RSI or MACD indicators
friends could anyone help me to create a formula to mt4 code. i dont know much about computer language. hope u help me
rsi<50 and macd>0 and 4sma>17sma>34ema>50sma to go long
rsi<40 and macd<0 and 4sma<17sma<34ema<50sma to go short