Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Entry Time Problem #464499
02/20/17 07:58
02/20/17 07:58
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
I have a script and set the following variables:

Code:
BarOffset = 15 * 60;
BarZone = WET;



I wanted the script to always trade in the afternoon. When I test the script and inspect the testtrades.csv file all the trades are in the afternoon so everything seems fine.

I now tried to trade the script live. One trade was opened in the afternoon, but the script tried to open a second trade right after the weekend ended at 23:00 while the Index CFD trading was still closed so no trade could be opened.

Why would the script try to open a trade at that time while in testmode no trades were opened on the weekend?

How can I fix this? Any hints?

Re: Entry Time Problem [Re: trenki2] #464503
02/20/17 10:36
02/20/17 10:36
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Because the first bar of a week starts sunday 23:00 by default. Your script is probably trading at every bar, regardless if it's 15:00 or not.

Just check the time before entering a trade.



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