tick update condition

 

Hell MQL4 community,

I need a condition to check if a new tick has just been created. I'm guessing to use the market info function with mode time or something along these lines?

Any suggestions?


Thank you

 
WhooDoo22:

Hell MQL4 community,

I need a condition to check if a new tick has just been created. I'm guessing to use the market info function with mode time or something along these lines?

A new tick has just been created or your code wouldn't be running,  any check is redundant . . .  unless you mean something else ?
 
A tick has come in, terminal or tester calls start(). You already learned this in your other thread.
 
WHRoeder:
A tick has come in, terminal or tester calls start(). You already learned this in your other thread.
Thank you for your reply William. :)
 
RaptorUK:
A new tick has just been created or your code wouldn't be running,  any check is redundant . . .  unless you mean something else ?

I wish to save price values updated by ticks. True, start() is called upon creation of a new tick BUT ;) I need to write a condition which will save price to an index of an array based on tick updates.

I've reviewed a thread "Can price != price ?" and noticed, the condition if(price!=price) cannot be used because of how price Ask/Bid is returned. Like I said, I seek to write a condition which will decide if a new tick has been made OR ;) something along these lines.


Currently, I believe I can't use conditions "if(price!=price)", due to price return values or "if(seconds!=variable sec)", because both seconds AND variable sec can both equal zero at the same time.

I can't just write, "variable=Ask", cuz the variable will always be current Ask. Ask must be saved to a variable based upon a condition.

I'm still searching for a condition to update price to an array's most recent index. I'm thinkin' to possibly use a different time format other than seconds to distinguish tick updates.


Thank you

Reason: