Hello!
There is in-built indicator
CUSTOMCANDLE in JForex 4 that implements solution you describe.
https://www.dukascopy.com/downloads/ban ... s/?lang=enPlease press Fn+F3 -> Enter "CUSTOMCANDLE" in search bar and add to chart -> Right click on indicator in the right panel and click "edit" - > Go to advanced settings and choose the type of candles you would like to add.
Please see screenshot in attachment.
![Image](https://www.dukascopy.com/swiss/english/forex/jforex/forum/download/file.php?un=1&id=10483)
Kind regards,
Dukascopy Bank