Gamestudio Links
Zorro Links
Newest Posts
Zorro S for Oanda US
by SteveG. 06/06/20 15:24
The Black Book
by SteveG. 06/06/20 14:01
Indicator coding
by danatrader. 06/06/20 11:53
New AUM
by Aku_Aku. 06/06/20 10:10
Reading a TXT file on server
by Truth. 06/05/20 18:22
Oanda instruments
by Morris. 06/05/20 10:24
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (SteveG, AndrewAMD, Mio, 3run, Iglarion), 479 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Frank_Shieh, PBSeven, Hardi01, Giuseppe, AdamWu
18461 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to delay entering / closing trade at certain time #480144
05/21/20 22:52
05/21/20 22:52
Joined: May 2020
Posts: 3
London
H
happysun Offline OP
Guest
happysun  Offline OP
Guest
H

Joined: May 2020
Posts: 3
London
Hello,
My script's BarPeriod=60, so it enters / closes trades on hourly basis. But I have problem entering / closing trades at New York closing time (EST 17:00) as at that time the market is closed for a few seconds and also the spread is very high. How can I delay trade entry / closing at this time (only at this time) for say 1 minutes?
Many thanks

Re: how to delay entering / closing trade at certain time [Re: happysun] #480149
05/22/20 04:33
05/22/20 04:33
Joined: Dec 2014
Posts: 171
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 171
Germany
The Parameters you are looking for are BarOffset or FrameOffset!

Re: how to delay entering / closing trade at certain time [Re: happysun] #480150
05/22/20 05:03
05/22/20 05:03
Joined: Mar 2019
Posts: 141
D
danatrader Offline
Member
danatrader  Offline
Member
D

Joined: Mar 2019
Posts: 141
Or use BarPeriod = 15; and Timeframe to create 60 Min bars.
Than you can close out early by 15 minutes.

Re: how to delay entering / closing trade at certain time [Re: danatrader] #480157
05/22/20 09:57
05/22/20 09:57
Joined: May 2020
Posts: 3
London
H
happysun Offline OP
Guest
happysun  Offline OP
Guest
H

Joined: May 2020
Posts: 3
London
Thank you for the advice! But this way [use BarPeriod = 15; and Timeframe to create 60 Min bars] will effect all my trade entry/close, so all my trades are shifted, but I only want to change the timing for this particular hour: EST 17:00

Re: how to delay entering / closing trade at certain time [Re: happysun] #480158
05/22/20 11:41
05/22/20 11:41
Joined: Mar 2019
Posts: 141
D
danatrader Offline
Member
danatrader  Offline
Member
D

Joined: Mar 2019
Posts: 141
Use Tick with a TMF that closes at that time maybe.
Or shift Timezone.

Last edited by danatrader; 05/22/20 11:41.
Re: how to delay entering / closing trade at certain time [Re: happysun] #480160
05/22/20 12:20
05/22/20 12:20
Joined: Dec 2019
Posts: 18
ozgur Offline
Newbie
ozgur  Offline
Newbie

Joined: Dec 2019
Posts: 18

Re: how to delay entering / closing trade at certain time [Re: happysun] #480170
05/23/20 11:51
05/23/20 11:51
Joined: May 2020
Posts: 3
London
H
happysun Offline OP
Guest
happysun  Offline OP
Guest
H

Joined: May 2020
Posts: 3
London
Many thanks guys for all your advice. In the end I decide to split my script into 2: one filter out EST 17:00 hour completely and another I use BarPeriod=30 to trade only at EST 16:30 hour. I have tried using TimeFrame to put both feature into one script but the results are not as good. My experience is that there are many surprises in TimeFrame feature and can produce unexpected results, difficult to debug. So two scripts solved my issue.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1