How to compare last tick prices with current price

 

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! 

 
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
 
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. 
Reason: