Simplest method to not order in a determinated range of price?

 
The ideia is not to enter in the range of price of the last position. For example if last position was opened in 1.15 the next should not enter from 1.20 to 1.10.
I was using CPositionInfo with PositionSelect(_Symbol) then PositionPrice, but when position is closed PositionPrice returns to zero. 
 
IagoGomes:
The ideia is not to enter in the range of price of the last position. For example if last position was opened in 1.15 the next should not enter from 1.20 to 1.10.
I was using CPositionInfo with PositionSelect(_Symbol) then PositionPrice, but when position is closed PositionPrice returns to zero. 

You need to look into the history

Check out historyselect