added portfolio to template and last position to entry signals