Documentation/AlgoCode/Function reference
buy
Open or add a long (or cover a short if the script is short only).
buy
Inside a when body. With long only, buy is the only entry. With once, a second buy is ignored while already in a trade. Live size still comes from Deploy, not from this word.
Return value
signal +1
Example
when close crosses above ema(21) buy