How to set signal strength threshold for switching WiFi on and off?
This would be messy for a comment, so consider it a partial answer.

The following task can stop or disconnect a WiFi if the signal level is below your preferred level.


Create a task named "Wifi" and create following actions in it:


Code &rarr; Run Shell:


Command &rarr; echo "%WIFII" | awk '/Sig: [0-9]/ {print $2}'  
Store Output In &rarr; %Signal


Alternatively, since awk requires installation of Busybox, for non-rooted devices use the action Variable &rarr; Variable Search  to search the integer next to Sig: in the variable %WIFII and save it in %Signal.
Task &rarr; If:


%Signal Maths: Less Than INT 



Replace INT with the signal value (0-9) at which Wi-Fi should disconnect
Net &rarr; WiFi &rarr; Off | Net &rarr; WiFi Net  &rarr; Disconnect


It is up to you how you want to use this Task. 

Note: Tasker has a profile option "WiFi near" under "State" where you can select SSID and/or Signal level of WiFi in proximity.

Hint: You may try running that task with a bit more modification under an infinite loop.