Download MetaTrader 5

How to compare last tick prices with current price

To add comments, please log in or register
Slawomir Dziegielewski
370
Slawomir Dziegielewski  

Hi,

 

Iam beginnger and looking form information how to put into code in command if()  a latest price (not last close bar price) - last tick or few ticks prices.

I need it to compare with currents price to start open order sell/buy.

 

Best regards! 

researchpro
57
researchpro  
parrotx:

Hi,

 

Iam beginnger and looking form information how to put into code in command if()  a latest price (not last close bar price) - last tick or few ticks prices.

I need it to compare with currents price to start open order sell/buy.

 

Best regards! 

good question, I can't figure out how to print the Last price either. No reserved word for "Last", as there is for Bid and Ask
Stuart Browne
6604
Stuart Browne  
researchpro:
good question, I can't figure out how to print the Last price either. No reserved word for "Last", as there is for Bid and Ask
First, there is no "last price" in forex as there is in equities. And a new tick doesn't necessarily mean that a trade took place. There is a last bid/ask but you can't access it "native". Best you could do would be to record each ticks's bid/ask as it happens, then when the next tick comes, you have the previous ticks data already for comparison. 
To add comments, please log in or register