About creating indicators using ZigZag, MACD, RSI, and Stochastics

 
I'm thinking of creating an indicator using ZigZag.
This indicator displays an arrow when the following conditions are met.
<Conditions for downward arrow>
① ZigZag's two most recent vertices are rising to the right
②MACD: Downward right at the same point of ZigZag above
③RSI: Downward to the right at the same point of ZigZag above (or the same value)

④ Stochastic: Cross when upper limit is 80 or higher (cross when lower limit is 20 or lower)

Regarding ①, I was able to create it. I don't know how to write the conditions ②, ③, and ④ to obtain the MACD and RSI prices according to the timing of the ZigZag peak.

If you know, please let me know.

ZigZagを利用したインジケーターの作成を考えています。

以下の条件を満たしたばあいに矢印が表示されるインジケーターです。

<下向き矢印(アラート)の条件>
①ZigZag直近の2頂点が右上がり
②MACD:上記のZigZagの同じ点で右下がり
③RSI:上記のZigZagの同じ点で右下がり(もしくは、同値)
④ストキャス:上限値80以上でクロス(下限値20以下でクロス)

<上向き矢印(アラート)の条件>
下向き条件の反対

①に関しては、できました。

②、③、④に関して、①のタイミングに合わせて値を取得する方法が分かりません。

分かる方、教えて下さい。

よろしくお願いいたします。

ファイル:
ZigZag_2.mq4  5 kb
理由: