Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Real Code Rule for Day of Week Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jsatt11
Posted : Monday, January 5, 2009 8:17:13 PM
Registered User
Joined: 11/26/2007
Posts: 116
Is there a way to write a Real Code rule to specify day of week, e.g. Monday??
Bruce_L
Posted : Wednesday, January 7, 2009 2:34:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The following RealCode Rule should work for Monday:

If Price.DateValue.DayOfWeek = 1 Then Pass

You would need to change the 1 to something else for a different day of the week:

1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
7 = Sunday

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jsatt11
Posted : Thursday, January 8, 2009 8:56:58 PM
Registered User
Joined: 11/26/2007
Posts: 116
Bruce,

Thanks very much for this.
I looked quite a bit before posting this question. One place I looked was in  Real Code and entering price. , but the pop up box did not and still does not contain the .DateValue option.

It sounds like the lack of documentation is costing the users a lot of time as well as Worden Support.

Jim
Bruce_L
Posted : Friday, January 9, 2009 7:45:24 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I don't know why it doesn't pop up when you type Price. with all checked, but I learned about DateValue from the RealCode Programmers Reference.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

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.