Make a trade on specific time...

 

hi!

how to make a trade if the current time is 13:00?

please help...

 

Something like this:


...

if (TimeHour(TimeCurrent()) == 13 && TimeMinute(TimeCurrent()) == 00 && !bOrderMade)

{

make your order and if successful, set bOrderMade to true...


CB


 
cloudbreaker:

Something like this:


...

if (TimeHour(TimeCurrent()) == 13 && TimeMinute(TimeCurrent()) == 00 && !bOrderMade)

{

make your order and if successful, set bOrderMade to true...


CB


cool thanks!

 
alexvorn2:

cool thanks!

Just be aware that with this particular condition, that no order will be made if a tick isn't forthcoming during the minute that server time equals 13:00.

Obviously there are ways around this by using a greater-than evaluation etc. But only you know exactly what behaviour you need.


CB

Reason: