Does anybody have the price based trailing stoploss / trailing take profit code to help me in completing the below for me:
buy= my statergy;
sell= price based trailing stoploss / trailing take profit code ;
short= my statergy;
cover= price based trailing stoploss / trailing take profit code ;
@santy, surely by now you realize that if you put no effort into solving your own problem, others are not likely to spend their valuable time trying to solve it for you. The best place to start with any stop or profit target is with the built-in ApplyStop() function: https://www.amibroker.com/guide/afl/applystop.html. Give that a try, and as always, post your code and tell us what roadblocks you encounter.
If that doesn't do what you want, then you can explore other options.
Look at that code, try to fully understand it referring to the documentation that Matt indicated to you, and then start to change it to add a "take profit" stop (stopTypeProfit),
When it works as expected, then try to replace the stop mode logic used in the example with the stopTypeTrailing type (providing the desired percent values), and so on.