logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Rafael  
#1 Posted : Tuesday, July 19, 2016 3:33:10 PM(UTC)
Rafael

Rank: Member

Groups: Registered Users, Subscribers, Unverified Users
Joined: 6/1/2016(UTC)
Posts: 10

How to program the Explorer to get quotes for an exact day?

For example: day's closing 31/12/2015

 

Thanks!

MS Support  
#2 Posted : Tuesday, July 19, 2016 7:12:14 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Hi, Are you wanting to scan from a specific date in the past, or are you wanting to reference data from a specific date/time via the formula language?
Rafael  
#3 Posted : Tuesday, July 19, 2016 7:20:30 PM(UTC)
Rafael

Rank: Member

Groups: Registered Users, Subscribers, Unverified Users
Joined: 6/1/2016(UTC)
Posts: 10

Hi,

Reference data from a specific date/time via the formula language.

I need to find the closing prices for a list of stocks on a specific date, for example, all the closing prices on 02/01/2015.

MS Support  
#4 Posted : Tuesday, July 19, 2016 7:39:30 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
The ValueWhen() function allows you to pull pricing information when certain conditions are true (including Date conditions). For example:

ValueWhen(1,Month()=2 AND DayOfMonth()=1 AND Year()=2015,C)

The C on the end would report the Close price when the condition (Month, Day, Year) is true. You could use other data arrays and indicator values in place of the Close price as well. You may not be able to use Load Minimum Records with this formula and would need to have the Explorer load a certain number of records (i.e. 500).

Edited by user Tuesday, July 19, 2016 7:42:16 PM(UTC)  | Reason: Not specified

Rafael  
#5 Posted : Tuesday, July 19, 2016 10:16:04 PM(UTC)
Rafael

Rank: Member

Groups: Registered Users, Subscribers, Unverified Users
Joined: 6/1/2016(UTC)
Posts: 10

Did not work...

 

Put in colA and Filter: ValueWhen(1,Month()=2 AND DayOfMonth()=1 AND Year()=2015,C)

Return was: No securities to report.

Edited by user Tuesday, July 19, 2016 10:16:37 PM(UTC)  | Reason: Not specified

MS Support  
#6 Posted : Wednesday, July 20, 2016 1:59:11 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Depending on the market, I believe this was a Sunday so there likely would be no securities to report.
mstt  
#7 Posted : Sunday, July 31, 2016 7:39:55 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Rafael

Here's a date filter indicator that has a number of uses including pin-pointing a particular date for an exploration to return prices or other values. As with any indicator using Input() functions the default values must be set to the appropriate date before being used by an exploration. In order to pick up data for the required date the default Input() parameters for at least the "end date" must be set to that date.

{Date Filter}
{Roy Larsen, 2003-2016}
Sd:=Input("Start day" ,1,31,1);
Sm:=Input("Start month",1,12,1);
Sy:=Input("Start year" ,1980,2020,2016);
Ed:=Input("End day" ,1,31,31);
Em:=Input("End month" ,1,12,12);
Ey:=Input("End year" ,1980,2020,2016);
Start:=(DayOfMonth()>=Sd AND
Month()=Sm AND Year()=Sy) OR Year()>Sy OR
(Year()=Sy AND Month()>Sm);
End:=(DayOfMonth()<=Ed AND
Month()=Em AND Year()=Ey) OR Year()(Year()=Ey AND Month()<em);
Start AND (End OR (Start AND Alert(Start=0,2)));

Assuming that both Start Date and End Date default parameters are set appropriately the code for your exploration could be as simple as

{ColA:}
Date:=Fml("Date Filter");
ValueWhen(1,Date,CLOSE);

If the Date Filter indicator is set to a non-trading day then it will return a TRUE for the next valid trading day. Even if the End Date occurs prior to the Start Date the result will point to the first trading day on or after the Start Date. I hope this is of some use.

Roy

Edited by user Monday, August 1, 2016 2:36:41 AM(UTC)  | Reason: Not specified

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.