How to define Max loss stop and Trailing Stops into AFL


I am new to Ami Broker. I am back testing various afls I got from the forum and other sources I want to add my own stoplosses and trailing stops to the system.

Senior Programmers pls help me. Here are the conditions

1.The initial SL is 2% of the entry price.
2.As the position moves into profit the trailing stop should be the max risk of 25% of the profit.

I've no clue how to put it into coding

Pls guide me.

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Are you a day trader?