Hello,
I created trading system in AmiBroker in which buy is based on moving averages, there is no sell, however I use stops as sell. There are the following lines:
ApplyStop(stopTypeLoss,stopModePercent,SL,1,0,0); //beginning stop
ApplyStop(stopTypeTrailing,stopModePercent,TS,1,0,0)...