It's been a while since I messed with the custom layer so this might not be the best way:
CUSTOM_DOC("Cycles through previously opened buffers in the current view")
View_Summary view = get_active_view(app, AccessAll);
static Buffer_Summary buf;
get_buffer_next(app, &buf, AccessAll);
if(buf.buffer_id == 0)
buf = get_buffer_first(app, AccessAll);
view_set_buffer(app, &view, buf.buffer_id, SetBuffer_KeepOriginalGUI);
Map this to CTRL + TAB and it should cycle through.
Note that the old documentation for "get_buffer_next" states:
"The global buffer order is kept roughly in the order of most recently used to least recently used".
So you might not get the cycle in the exact order you wanted.