Develop a MT4 chart for me. The details of the chart are:-
The logic is to plot all the supports and resistances as per "single tick" movement but plot ONLY those supports and resistances which are formed AFTER a specified size movement OR the "Average Time" elapse, whichever is earlier.
Average Time:- It is the average time taken for the specified size movement till any moment which is calculated using the movements of all/set number of previous completed candles before that moment.
Formula to obtain Average Time:-
"Average Time" for specified size =
Set Pip Size X [(Total time taken by all/set no. of completed candles for it’s completion)÷(Sum of size of all completed candles in pips including pipettes)]
Detailed Explanation of the Logic:-
Plot all the Supports and Resistances as per "single tick" movement BUT each candle must be of AT LEAST specified size OR "Average Time" elapse. Candles can be larger than the specified size as candle completes only when a Support or Resistance is formed AFTER the specified size is achieved or "Average Time" elapse is achieved.
Candle completion due to "Average Time" achievement:- Complete the candle at the completion of the tick as soon as the time elapsed since the start of the formation of a candle gets equal to "Average Time".
Candles should have OHLC.
How to plot:- Don't plot any support or resistance untill and unless the specified size movement OR "Average Time" elapse is achieved for a candle. As soon as the above is achieved start looking for the formation of any "single tick" based support or resistance. As soon as it is formed, complete present candle and start new candle from that support or resistance level point and continue the steps as explained from the beginning in this paragraph.