I need to make a connection like the red one without making short circuit with the blue connection in the following circuit.
In the answered question Circuitikz Wire Kink Thingy When Wires Cross,both P1 and P2 are already shifted at x-axis "cascaded", but in my case the two mosfets M1 and M4 are y-axis shifted "cascoded".
\begin{circuitikz}
\ctikzset{tripoles/mos style/arrows}
\draw
(0,0) node[nmos] (nmos2) {} node[right] at (nmos2) {M2}
(nmos2.G) node[nmos, xscale=-1, anchor=G] (nmos1) {} node[left] at (nmos1)
{M1} %below left,yshift=0.3cm
(nmos1.S) -- (nmos2.S) node[sground] {}
(nmos2.D) node[nmos, anchor=S] (nmos3) {} node[right] at (nmos3) {M3}
(nmos3.G) node[nmos, xscale=-1, anchor=G] (nmos4) {} node[left] at (nmos4)
{M4}
(nmos3.D) to[short] ++(0,2)
node[inputarrow,rotate=270] {} node [right,]{$i_{OUT}$} to[short] ++(0,0.5)
(nmos4.D) to[R,l=$R_1$,n=R1] ++(0,2) to[short] ++(0,0.5)
node[inputarrow,rotate=270] {} node [left,]{$i_{IN}$} to[short] ++(0,0.5)
(nmos4.D) node[circ] {} -| (nmos2.G) node[circ] {}
(R1) ++(0,1) node[circ] {} -| (nmos3.G) node[circ] {}
;
\end{circuitikz}