Duplicate: Implementation of trailing stop loss

Hi,

Can somebody help with the following to enable me to program my strategy:
a) How to implement price based trailing stop loss i.e I want to sell x% below the last max price and buy x% above the last min price.
b) How can I define the buy and sell price other than the High, Low, Average, Open, close of the candle. I want to use price based trigger. If my price level is achieved in a particular candle, the simulation should consider my trigger price as the buy/sell price.

Thanks

Google is your friend. Type 'amibroker trailing stop' in Google. And you will get other posts on this forum as well as this one:
http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-the-price-chart/

which includes the code you can use to implement any kind of trailing stop you want.

Then if you have questions continue discussion in existing threads (https://forum.amibroker.com/search?q=trailing%20stop) instead creating yet another duplicate.

Duplicate topic on same subject.