my main concern is if FLATTENEVERYTHING is safer as it can not result in a race condition as it just closes anything open and cancels any order
however CLOSEPOSITION may result in an exception if there are no open positions...or...maybe if long it sends a sell which can result in a reverse if the race is lost

Comment