Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, rki), 390 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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