History comparison
Created at 24 May 2020, 18:29
TW
History comparison
24 May 2020, 18:29
hello guys I need help, I need to compare the closing time of a position, with the current time, in the sense that: if the time of the position just closed in "history." it is different from the current tick time. place a new order i try this but it doesn't work
if (History.FindLast("Label_of_The_Bot").ClosingTime != Server.Time.Date)
{
execute order;
}
Replies
twoheartzin1soul
26 May 2020, 18:21
Thanks for the reply, the problem that History.FindLast (). Closingtime provides a given dd / mm / YYYY HH / Minutes Example:23/0/1999 12:30 instead Server.Time provides DD / MM / YYYY HH / MM / Seconds example: 23/05/1999 12:30:15 how could I make this comparison?
@twoheartzin1soul
PanagiotisCharalampous
27 May 2020, 08:33
Hi twoheartzin1soul,
I am not sure where you got there prints from but both types are DateTime types so comparison should not be a problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 May 2020, 08:38
Hi twoheartzin1soul,
It is not clear what the problem is but try using Server.Time instead.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous