I admit that I still do not fully understand any of your problems.
It is irrelevant if you use elements of a series, or separate variables with the same content. Variables that have the same value always behave the same way. A different name or origin of the variable will not make an "if statement work better". An if statement does not care where the variables come from that it compares.
An entry stop does not enter at the given price. You can not choose the price at which you enter a trade. You can only choose the time. When you have a current price of 10 Dollars and place a short order with an entry stop of 15 Dollars, your order will at once open at 10 Dollars, no matter how high you placed the entry stop. At least that's how I understand your problem. The concept of entry stops and limits is explained on many websites.
The order of function definitions in a script is also irrelevant. All this is not the reason when your script does not behave as you want. If you can not find the problem by looking at your script, definitely use a printf statement that prints _all_ variables in question. This gives you often a lot more direct insight than a line on a chart.