how can i get 20 30 second and 2 minute chart in mt4?
They are non standard time-frames. You will have to "build" them using 3rd party tools which can then be opened as "Offline Charts" in MetaTrader.
There may be a few such tools in the "Code Base" section, but they are probably old and might not work on the newer builds.
As for 3rd Party tools, we are not allowed to refer you to them here on this site, so you will have to do a "Google Search". Most of them are commercial but there are a few "free" ones too.
PS! There might be such tools in the "Market" section as well.