Create new tax type within Sales Taxes and Charges doctype

Hi i would like to create a new type within the Taxes and Charges doctype which will calculate the taxe rate on an other amount within my sales order
Case explanation:
in our business each item has a fixed ecotax so i created a new field ecotax in each item then within the sales order items i calculated for each line item the total line item ecotax (basicly qty * item_ecotax) then i summed up the total order ecotax within a total ecotax field in my sales order.
Now what i want is to calculate the total ecotax with VAT and add it to the total sum. So my idea is to add a new type of sales taxes name “Ecotax” with rate 20 but to apply the calculation on my total_ecotax field. my problem is that i dont know where to define this rule i tried with custom script but i dont know within what event i need to add my code.
Thanks for your help