'Trying to use ta.valuewhen as float variable to use a stop loss

Im trying to get the value of the low of a bar with my conditions as a float variable so that i can use it as a stop loss. This is what i have so far "buylow = ta.valuewhen(buyretracebar, low, 0)" however when i try to use "buylow" as a stop it saying it's returning a boolean not a float any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source