Auto Simple Queue From DHCP Server - MikroTik Script RouterOS

How To Creating Automatically Simple Queue using DHCP Server Lease Script

:local queueName "Client- $leaseActMAC";
:if ($leaseBound = "1") do={
 /queue simple add name=$queueName target=($leaseActIP . "/32") max-limit=1M/2M comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name];
} else={
    /queue simple remove $queueName
} 
Credit: www.o-om.com