range is a variable that calculates the average range of the last 10 days i don't know what x means but if it ever equels 1 then the system will buy tomorrow at the high of the day plus 20% of the average true range for the last 10 days at a stop price as opposed to a limit or market order