If you do it in the script, use a fixed margin that is the same for all trades of all components.