Close trade after x minutes
7 replies
krikri
10 years ago #115478
Hi,
How can I do to close trade after X minutes ?
Thanks in advance for your help
Kris
0
Tomas Matejka
10 years ago #138975
Hello,
this is the way how to count minutes inside your EA and execute an order then. Look at this https://strategyquant.com/forum/topic/4517-count-minutes-within-bar/
0
krikri
10 years ago #139145
Hello tomas262,
thanks for your explanations but it doesn’t work , see my sqw attached, the trades must be closed after 12 minutes
can you help me please.
best regards
Christian
0
Tomas Matejka
10 years ago #139157
Hello,
yes, I will look at what you have done so far and let you know
0
TJ#
10 years ago #139278
try this…
Used the time range as you to run the test…
0
krikri
10 years ago #139314
Hi TJ#,
your SQW file Is the same as mine , how use the time range.
Hi Thomas262 , do you look at my problem as you said above?
best regards
Kris
0
Tomas Matejka
10 years ago #139326
Hello,
I have created a sample on how to exit a trade after X minutes (set to variable exitMins)
0
krikri
10 years ago #139329
Hello Tomas262,
Thank you for the example code.
. Thank you again for all your help
Kris
0
Viewing 7 replies - 1 through 7 (of 7 total)