Backtest trades with Variation

Hi,
I was wondering if amibroker has the ability to help me improve my sell price? I am following a system of Buys and Sells with parameters already set for me.

I want to set my own "target exit price" and have Amibroker scan to see when the next "High" is above my target exit price.

For example:
My Current System has the following
Code = CSL
Buy 01 May 2020 @ $308
Sell 01 Jun 2020 @ $277
Loss = -$31

I want to avoid a loss so on 01 Jun 2020, I set my Sell price @ $308
(Answer = 10 Nov 2020 - High = $291.94)

OR

I update my parameter with a 5% loss @ 293
(Answer = 04 Jun 2020 - High = $294.61)

My questions

  1. Can Amibroker do this on a portfolio basis? ie. I would like to upload a list of transactions and perform the same test for each transaction. Maybe Sell at Close if the High is not reached in 3 months?
  2. Can Amibroker tell me how many trades I have outstanding at any given time? This is to help me calculate my cashflow required because I have held the stock past its sell date .
  3. Can this be soft coded? If so, how?

Thanks,