How can I calculate or memorize the profit and loss status of the last transaction in Pine Script? For example, If my last trade lost 10%, I want to use a different condition in the next trade. So I need to be able to calculate or memorize the last transaction. Thank you for helpings.
