The element variable {ce_last} is parsed inside every element to indicate if it is the last element for this entry_id (across all element types). It has a boolean value of true (1) or false (empty) used for conditionals.

Simplified case example:

{exp:channel:entries channel="your_channel" limit="10"}

	{custom_field}
	
		{heading}
			{value}
		{/heading}
	
		{wysiwyg}
			{value}
			{!-- This text will be printed only after wysiwyg which is also the last element in entry --}
			{if ce_last}<p>This wysiwyg is printed as the last element.</p>{/if}
		{/wysiwyg}
		
		{text_field}
			{value}
		{/text_field}
		
	{/custom_field}
	
{/exp:channel:entries}