Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Set regular trading hours? #464591
02/28/17 07:48
02/28/17 07:48
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
Is there any parameter that I can set to determine the regular trading hours for my algo, ie "Don't trade before this time and exit all positions at that time".

Currently I'm doing this manually like so

//Only enter trades during these hours
if (hour() >= 9 && minute() >= 0 && hour() <= 17 && minute() <= 29)
{
...
enterLong();
...
}

if (hour() >= 17 && minute() >= 30)
{
exitLong();
}

Re: Set regular trading hours? [Re: Dalla] #464597
02/28/17 14:53
02/28/17 14:53
Joined: Feb 2017
Posts: 8
Veli Offline
Newbie
Veli  Offline
Newbie

Joined: Feb 2017
Posts: 8
Hi Dalla smile

I haven't found a parameter so far. Like you I'm curious if there is one.

Similar to you I use an IF statement:
Code:
if(ltod(CET) >= 900 && ltod(CET) <= 1729)
{
  ...
  enterLong();
  ...
}



Does someone else have any ideas? wink

Best wishes

Veli

Last edited by Veli; 02/28/17 14:57.
Re: Set regular trading hours? [Re: Veli] #464607
03/01/17 10:28
03/01/17 10:28
Joined: Nov 2016
Posts: 35
therealLeon Offline
Newbie
therealLeon  Offline
Newbie

Joined: Nov 2016
Posts: 35
Hi,

@Veli: Your way is the same way i handle timeframes for trading.

BR

Leon

Last edited by therealLeon; 03/01/17 10:29.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1