why it's open position at that price?

 
I tried to create EA and works well on backtest but on demo account why it's open position at that price?
Files:
 
NaiTON.PTK:
I tried to create EA and works well on backtest but on demo account why it's open position at that price?
You buy at the Ask and sell at the Bid.
The charts show Bid prices only.