Техническое задание
Description:
Project predicted swings of price above and below MA based on previous recorded difference between price and MA for each candle.
With each candle close, the highest and lowest percentile path is drawn on chart. Each pair of paths becoming tighter and tighter with the gradually reducing gap between percentiles.
Settings:
* Candles to sample
* Path colour upward trends
* Path colour downward trends
Data collection:
* Candle closes above MA is labeled candle 1 in upward trend and difference between price close and MA recorded.
* 2nd candle difference recorded, 3rd candle difference recorded etc.
* Candle closes below MA is end of upward trend and is not recorded in upward trend. This is recorded as start of downward trend candle 1. Follow steps above.
Data processing:
* All candle 1 difference entries for upward trend recorded in numerical order, smallest to largest.
* Candle 2, 3, 4 entries recorded the same way.
* Same carried out for all downward trend entries.
Indicator:
1. Candle closes above MA and the difference is compared to recorded upward trend candle 1 data to see what percentiles it matches with.
2. According to what percentiles candle 1 matches with from recorded data, plot future path from connecting candle 1, 2, 3 etc of the highest and lowest matching percentile.
3. Next candle closes above MA and step 1 and 2 is followed using current and all previous candles in this trend. The difference between 1 and ma, 2 and ma, 3 and ma is compared to recorded data for 1, 2, 3. Highest and lowest percentile with all matching candles is drawn.
4. Repeat 3 until end of trend.
5. Once trend ends and candle closes on opposite side of MA, end the drawn paths. Keep them, do not delete.
* if no matching path, do not draw any new paths for this trend.