For the purpose of tracking high frequency trades, I need the time to be more granular....down to the second level.
Anyone else have a need for this ?
Need EntryTime_s and ExitTime_s [SOLVED]
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Need EntryTime_s and ExitTime_s
syswizard,
in my opinion there is no need for these reserved words, as we can access a better granularity using PosTradeEntryDateTime and PosTradeExitDateTime already.
Regards,
ABC
in my opinion there is no need for these reserved words, as we can access a better granularity using PosTradeEntryDateTime and PosTradeExitDateTime already.
Regards,
ABC
Re: Need EntryTime_s and ExitTime_s
Whoa....I was unaware of the Pos... functions. Thanks for that.syswizard,
in my opinion there is no need for these reserved words, as we can access a better granularity using PosTradeEntryDateTime and PosTradeExitDateTime already.
However, how do I get the TradeNumber ?
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Need EntryTime_s and ExitTime_s [SOLVED]
syswizard,
check the respective reserved word in the help file. This should answer your questions.
ABC
check the respective reserved word in the help file. This should answer your questions.
Regards,PosTradeExitDateTime
Returns double-precision decimal DateTime for exit order. As an example see ComputerDateTime
Usage
PosTradeExitDateTime(PosAgo,TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based).
Notes
This function can only be used in signals.
To retrieve the total number of trades in specified position use PosTradeCount
Example
PosTradeEntryDateTime(1,1) will return a value of 39448.25000000 for the second trade of the last closed position, if this trade was closed at 6:00 AM on January 1st, 2008.
ABC
Re: Need EntryTime_s and ExitTime_s
I've been told this value should be zero....almost always.TradeNumber - a numerical expression, specifying the number of trade (zero-based).
Wait ! I need a function to tell me how many TRADES were made so far in the session(s).To retrieve the total number of trades in specified position use PosTradeCount
Otherwise I must loop to compare all EntryDates and EntryTimes and increment a counter.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Need EntryTime_s and ExitTime_s
Hi syswizars,
which indicator do you want to build?
If you want to build a strategy with this information what do you use it for?
which indicator do you want to build?
If you want to build a strategy with this information what do you use it for?