Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
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, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TradeDate does not hold trade entry date #479856
05/01/20 15:30
05/01/20 15:30
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
The manual states that TradeDate is:
Quote
The time in Windows Date format when the trade was entered (for pending trades) or opened (for open trades).


However, this toy code:
Code
int checkTradeEntryDate()
{
	print(TO_LOG,"\nTradeEntry=%s", strdate(HMS, (var)TradeDate) );
	
	return 0;
}

function run()
{
	set(LOGFILE,TICKS);
	
	StartDate=2020;	
	BarPeriod=60;
	MaxLong =1;
	
	LifeTime=5;
	
	Entry = -5*PIP;
	
	if (priceClose(0)>priceClose(1))
	  enterLong(checkTradeEntryDate);	
}

produces this output:
Quote
[82: Tue 20-01-07 22:00] (1.11524)
(EUR/USD::L) Long 1@1.11474 Entry limit
(EUR/USD::L) Entry limit 1.11474 hit by 1.11468 at 22:01:00
TradeEntry=NaD
[EUR/USD::L08301] Long 1@1.11480 at 22:01:00
TradeEntry=22:01:00
TradeEntry=22:01:00


TradeDate never contains the time of trade entry, only the time when a trade was actually open.

Re: TradeDate does not hold trade entry date [Re: Zheka] #479904
05/04/20 13:20
05/04/20 13:20
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Right, the first part of the sentence is wrong formulated. Correct is:

"The time in Windows Date format when a trade is to be entered (for pending trades with OrderDelay) or was opened (for open trades)."

Re: TradeDate does not hold trade entry date [Re: Zheka] #479906
05/04/20 13:32
05/04/20 13:32
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Similarly, TradeExitDate does not hold the time of a pending order expiry. Is it also only correct for those entries with OrderDelay?

Would be great to make these work as was previously described (which is quite logical and convenient), rather than changing the manual to fit implementation...


Moderated by  jcl, Nems, Spirit, Tobias 

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