|Hot to set a time stop?
|Page 1 of 1|
|Author:||fliesch [ Sat Jul 11, 2009 12:47 am ]|
|Post subject:||Hot to set a time stop?|
Somehow I am not able to program a time stop after e.g. 10 bars after entry.
|Author:||MaRCHeW [ Sat Jul 11, 2009 11:04 am ]|
Count new bar from order entry or its better way use DateTime structure which will be check order entry time and present time.
|Author:||fliesch [ Sat Jul 11, 2009 11:26 pm ]|
"DateTime structure which will be check order entry time and present time. "
Present time: Clock.Now or Bar.EndTime?
But how to calculate the difference? In Bars? Tried something with Bar.Duration but did not work.
|Author:||Johnson [ Mon Jul 13, 2009 2:24 pm ]|
Check out the TimeSpan class. Its easy.
TimeSpan ts = new TimeSpan();[/code]
ts = datetime1 - datetime2;
if (ts.Minutes > 15)
|Page 1 of 1||All times are UTC + 3 hours|
|Powered by phpBB® Forum Software © phpBB Group