Versatile logic in implementing order block/POI zones in SMC based EA

 
I'm trying to develop an SMC indicator in which I plan to integrate to an EA. I'm curious, in regards to POI/order blocks. What is the usual algorithm to implement this key aspect?