If it's supposed to edit its own post only, make it with *author*'s capabilities. If it should edit posts of other users, as well, make it with *editor*'s capabilities.

## Case 1 ##

    function wpse_add_your_role() {
    	$role = get_role( 'author' );
    	if ( ! empty( get_role( 'your_role' ) ) ) { 
    		remove_role( 'your_role' );
    	}
        add_role( 'your_role', 'Your Role', $role->capabilities );
    }
    add_action( 'init', 'wpse_add_your_role', 10 );
## Case 2 ##
    function wpse_add_your_role() {
    	$role = get_role( 'editor' );
    	if ( ! empty( get_role( 'your_role' ) ) ) { 
    		remove_role( 'your_role' );
    	}
        add_role( 'your_role', 'Your Role', $role->capabilities );
    }
    add_action( 'init', 'wpse_add_your_role', 10 );
## Code location ##
In both cases, put the code in current theme's `functions.php` file. Once the new role is created, remove the code from `functions.php`, or comment out this line:

    // add_action( 'init', 'wpse_add_your_role', 10 );