# How to test and find the highest price reached after a buy triggered?

#### bipangs

##### New Member
I want to test a few strategies in amibroker. I would like to know how much is the highest price hitted after a buy signal was triggered(no time limit). How can this be done?

#### abcpankaj

##### Active Member
MFE (Most favourable Excursion) column in the back test report ,displays highest price reached for that trade.

#### johnnypareek

##### Well-Known Member
Can you tell in some more details.

#### johnnypareek

##### Well-Known Member
highestsince( Cross( macd(), 0 ), Close, 1 )

#### bipangs

##### New Member
MFE (Most favourable Excursion) column in the back test report ,displays highest price reached for that trade.
Thanks abcpankaj, I have got it now from the backtest report. Very valuable reply..

#### bipangs

##### New Member
highestsince( Cross( macd(), 0 ), Close, 1 )
Thanks a lot Johnypareek, abcpankaj had pointed out MAE/MFE in the backtest reportwhich was what I was looking for. Thanks a lot for your intent to reply..

#### bipangs

##### New Member
Dear johnypareek/abcpankaj/other tj companions,

next doubt that has come up during testing for which I couldn't get enough resource on net: Is it possible to optimise stoploss and profit targets automatically to get the most profits.
For example, I have a simple formula that produces 12 percent returns for a year. Instead of trying all combinations of sl and profit manually, is it possible to find the correct combination of sl and profit for achieving maximum net profit?
May be it is the lazy part inside me that is asking this question..

#### abcpankaj

##### Active Member
Try like:

ApplyStop(stopTypeProfit, stopModePercent,Optimize("pft",3,1.1,9.9,0.2) , 1 );

ApplyStop( stopTypeNBar, stopModeBars, Optimize("sellbars",5,3,50,1) );

#### bipangs

##### New Member
Try like:

ApplyStop(stopTypeProfit, stopModePercent,Optimize("pft",3,1.1,9.9,0.2) , 1 );

ApplyStop( stopTypeNBar, stopModeBars, Optimize("sellbars",5,3,50,1) );
Thanks abcpankaj for the reply. I am able to optimise now.

#### bipangs

##### New Member
Dear tj friends,

I am stuck up elsewhere and cant find a simple answer on net. I am a bit bad in understanding programming. While backtesting, I want the report to contain columns for close prices when the buy and sell are triggered. How to do it?