Reply

Trades only 8 am – 3 pm

24 replies

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #232923

Hello, I would like to go long only at certain times eg 8am – 3 pm. Optional 5-9 clock.
It does not work in the backtest. The orders are opened only in the time from 8 am to about 10 am.
What could it be? Here my example:

Best regards

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #232947

Hello,

please zip all the files into a ZIP archive and try to re-attach

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #232967

Hello, once again…

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #233025

Hello,

the condition needs to be modified slightly. Check the file attached

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233056

Hello, great !!!  thank you

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233057

and if i like trade 8 – 15 and 16.30 – 22  ?

i try this without minutes:
And ((Hour[0] >= 8)
And ((Hour[0] <= 15)
And ((Hour[0] >= 16)
And (Hour[0] <= 22)

its not working, no trade will be open.

Close all positions at 21.55 sounds good. How can i do this?

regards

 

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

6 years ago #233072

I think the condition will never happen and parenthesis is wrong.

Try it with

((Hour[0] >= 8) AND (Hour[0] <= 15))
OR ((Hour[0] >= 16) AND (Hour[0] <= 22))

 

Conmariin 🙂

Automatisches Handeln mit Expert Advisor
https://www.rabenesche.de

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #233097

Hello,

yes Conmariin is correct on this. You need to use the OR operator so market is either in range from 8 to 15 OR from 16 to 22

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233171

Hello,
that sounds good, but where can I find the OR operator? Whenever I create a rule, it is always AND operator at the beginning of each line.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #233177

Hello,

click on the “and” and select “or” instead 😉

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233191

Hello, oh thanks, I had not discovered that

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233197

Hello, something is wrong…

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #233201

Hello,

you need to use parentheses as Conmariin showed higher.

((Hour[0] >= 8 AND Hour[0] <= 15)
OR (Hour[0] >= 16 AND Hour[0] <= 22))

So you enclose “ANDs” together. If you need me to edit the project for you please send to [email protected] or upload ZIP file

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233205

hello tomas, I have sent you a mail with file and explanation on your e-mail. Best regards Uwe

0

Uwe6000

Subscriber, bbp_participant, community, 27 replies.

Visit profile

6 years ago #233285

hello, can I change that in the wizard or is that only possible in the Meta Editor?

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #233295

Hello, surely can be done in EA Wizard, I have sent you an email back

0

Viewing 15 replies - 1 through 15 (of 24 total)

1 2