Wrong ASK value in onTick event

Hello everyone, in my EA, at times when the ASK line is too far from the BID, the value received in the onTick event with "SymbolInfoDouble(_Symbol,SYMBOL_ASK)"

does not match the value of the line in the graph, and it is not possible to do the necessary calculations correctly, because this happens and how to get this value correctly?

see the image below:

ERROR ASK

you need to create a spread filter