Re: “but it would be nice if we could improve the trades made inside blue rectangle” (when price was dumping)
One method that you could look into is to use the 3 candles rule. When there is 3 red candles, pause the buy condition until a green candle closes.
Also using the percentage away from an EMA with the 3 candle rule and looking at what volume is doing. Is it increasing or decreasing. If volume is decreasing over the last 3 candles then it’s better to wait to DCA.
Do you think there would there be any benefit to adding a bigger (assumed) DCA buy override (if that is possible) when price falls to a detected support level (using Support/Resistance)… as a suggestion for some added smarts in the following phase?