Reply

Close trade after x minutes

7 replies

krikri

Subscriber, bbp_participant, community, 49 replies.

Visit profile

7 years ago #115478

Hi,

 

How can I do to close trade after X minutes ?

 

Thanks in advance for your help

 

 

Kris

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 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

Subscriber, bbp_participant, community, 49 replies.

Visit profile

7 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

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139157

Hello,

 

yes, I will look at what you have done so far and let you know

0

TJ#

Customer, bbp_participant, community, 144 replies.

Visit profile

7 years ago #139278

try this…

 

Used the time range as you to run the test… 

File: 001a.png001a.png

0

krikri

Subscriber, bbp_participant, community, 49 replies.

Visit profile

7 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

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139326

Hello,

 

I have created a sample on how to exit a trade after X minutes (set to variable exitMins)

0

krikri

Subscriber, bbp_participant, community, 49 replies.

Visit profile

7 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)