not trade specific day of the week

Questions about MultiCharts and user contributed studies.
tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

not trade specific day of the week

Postby tradersheldon » 01 Oct 2010

i would like to program the multichart for only trade 4 days of the week how is possible to detect one day during the week and program it to not trade that day.. i see that not detect the day automatically of the current week.... some tips to do that...

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: not trade specific day of the week

Postby ABC » 01 Oct 2010

Hi tradersheldon,

the reserved word "DayOfWeek" can help you in identifying what you are looking for.
You would check with "if DayOfWeek(Date)" if the particular day matches your conditions for trading or not.
DayOfWeek
Returns a numerical value, indicating the day of the week corresponding to the specified date, where 0 = Sunday, 1 = Monday, etc.

The Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.

Usage
DayOfWeek(YYYMMdd)

Where: YYYMMdd - a numerical expression, specifying the date in YYYMMdd format

Example
DayOfWeek(1080101) will return a value of 2, indicating Tuesday, for January 1st, 2008

DayOfWeek(990603) will return a value of 4, indicating Thursday, for June 3rd, 1999
Regards,
ABC


Return to “MultiCharts”