Queue dynamic on VLAN

Hello,

I would like a script:

On all IP a VLAN, if:

IP uses a 6 mbp/s for 3 minutes, add this IP on a queue, the download limit 2 mbps, and the name of the queue will be the host name.

If this host name no longer using the max bandwidth (2 Mbps) in the queue for 5 minutes, remove the queue.

Is it possible to do this, can you help me, I’m new to the RouterOS script

best regard

Try This here, change only address, mac-address, rx-tx (Bandwidth dynamic queue), server name and at least the comment

/ip dhcp-server lease add address=192.168.1.0 mac-address=FF:FF:FF:FF:FF:FF server=“Vlan-server-name”
lease-time=10m use-src-mac=yes rate-limit=1M/2M insert-queue-before=first comment=“test”