SNS_LOCALTIME

Moderator: moderators

User avatar
snscott
rank: 50+ posts
rank: 50+ posts
Posts: 60
Joined: Sun May 24, 2009 2:15 pm
Reputation: 0
Location: Great Republic Of Texas
Real name: Steven Scott
Gender: Male

SNS_LOCALTIME

Postby snscott » Mon Oct 26, 2009 2:02 am

Simple "LOCAL TIME" indicator that lets you add a sub-window with your local time for each of your candles. This seems to be something a lot of people across many forums wanted to be able to do and so there may already be other indis out there that do the same thing - I'm not sure.

You can specify if you want the time displayed as 24-hour style or 12-hour style (with AM/PM added beneath the time). You get complete control over the font used and the colors used for time and AM/PM.

It looks like this:

Image

This is showing US Central Time, adjusted to fit my broker's (FXCM) time. There is an "hour offset from broker time" parameter for you to set it to match whatever your time situation is.

You may have to tweak the exposed parameters and then adjust the window size once you add it to a chart to get it to look exactly as you want, but then if you save that as a template you'd only have to mess with that once. You can make the line spacing tighter than above if you want to.

By default, it limits itself to only showing local time for the past 50 candles (to save time and memory), but this is an exposed parameter you can adjust.

Enjoy!

[hr]
VERSION HISTORY

v1.0 - initial release
v1.1 - Added Market Open/Close Markers
v1.2 - modified to use SNS_ObjectLibrary.mqh

[hr]

REMINDER: SNS_ObjectLibrary.ex4 file goes into the experts:LIBRARIES folder and the SNS_ObjectLibrary.mqh file goes into the experts:INCLUDES folder.
Attachments
SNS_LocalTime.zip
v1.2 - Place SNS_ObjectLibrary.exe4 in your experts:libraries folder and SNS_ObjectLibrary.mqh in your experts:includes folder.
(39.1 KiB) Downloaded 45 times
Last edited by snscott on Tue Dec 01, 2009 8:22 pm, edited 4 times in total.
Image

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
Patch
rank: 500+ posts
rank: 500+ posts
Posts: 941
Joined: Sat Jan 06, 2007 6:13 pm
Reputation: 0
Location: Virginia
Real name: Jeff
Gender: Male
Contact:

Postby Patch » Mon Oct 26, 2009 2:28 am

snscott

Great idea to set up this thread and to put sns at the beginning of each indi you create to make it easy to find among the many indi's we have in our indicator file.

Another job well done, and thank you very much again. You do great work.

Patch
ENOUGH being a Yalie for me Back to the Sea. "What i can lose, i can win" "YES YOU CAN" - dragon33 -"Pick one method and one pair and stick with them until you master it. "The choice is yours - success or failure." TRO

User avatar
snscott
rank: 50+ posts
rank: 50+ posts
Posts: 60
Joined: Sun May 24, 2009 2:15 pm
Reputation: 0
Location: Great Republic Of Texas
Real name: Steven Scott
Gender: Male

SNS_LOCALTIME UPDATED

Postby snscott » Tue Oct 27, 2009 3:37 am

UPDATED SNS_LOCALTIME Indicator to provide optional [most recent] Market Open/Close Times. (Actually, the times can be for anything you want I suppose, since you get to provide the NAME you want displayed like "NY" or "New York" or "YANKS" - Whatever. I use "COWS COMING HOME NOW".) :P

The default settings draw the lines with vertical text labels like this:

Image

But you can toggle TEXT.VERTICAL to false and have the labels displayed like this if you prefer:

Image


You can toggle on/off the display of market opens/closes for each of four markets: SYDNEY, TOKYO, LONDON, and NEW YORK. You can specify the color, width, and style of each line (open & close) and the font, size and color for each market independently.

You also will need to specify the open/close times in your LOCAL time using the same format that the indficator draws your local time. For example, "07:00 AM" is when New York Opens in USA CENTRAL TIME.


There are spacing adjustments available for tweaking as you select different fonts and font sizes to make it display as you wish.

The LINE.SPACING property is only imporant in making sure the AM/PM marker is drawn far enough below the times when using HORIZONTAL TEXT.

The SESSION.OFFSETFROMDAILYLOW property allows you to adjust where the session open/close text is displayed (offset from the DAILY LOW).

The SESSION.LINESPACING property allows you to control the distance between the market name and the open/close text.

If you change Font Sizes from the defaults, you will probably have to tinker with the spacing and offset values to get it to look exactly as you want it to.

Also had to update the SNS_ObjectLibrary as well, so grab that also.

Files have been updated in the first psot of this thread.

Steven N. Scott
How will I get rich trading forex and losing all the time? Volume, buddy, volume! :-)

User avatar
cr0cop
rank: 50+ posts
rank: 50+ posts
Posts: 87
Joined: Tue Jul 21, 2009 6:41 pm
Reputation: 0
Location: TEXAS
Real name: Mirko
Gender: Male

Postby cr0cop » Fri Nov 06, 2009 6:50 pm

thanks for the indicator

User avatar
Patch
rank: 500+ posts
rank: 500+ posts
Posts: 941
Joined: Sat Jan 06, 2007 6:13 pm
Reputation: 0
Location: Virginia
Real name: Jeff
Gender: Male
Contact:

Postby Patch » Fri Nov 06, 2009 8:21 pm

snscott & Gray Cat

Another great indi, and one that will be a great help on with the BZ project I am currently working on.

Thank you !

Patch
ENOUGH being a Yalie for me Back to the Sea. "What i can lose, i can win" "YES YOU CAN" - dragon33 -"Pick one method and one pair and stick with them until you master it. "The choice is yours - success or failure." TRO

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

glenngie
rank: <50 posts
rank: <50 posts
Posts: 38
Joined: Sat Oct 03, 2009 4:51 am
Reputation: 0
Gender: None specified

Postby glenngie » Fri Nov 06, 2009 8:59 pm

that's great!!!

User avatar
RockHardTen
rank: <50 posts
rank: <50 posts
Posts: 29
Joined: Thu Jun 18, 2009 8:31 pm
Reputation: 0
Gender: Male

Postby RockHardTen » Fri Nov 06, 2009 9:52 pm

hmmmm.... can't get it to look like ur pic steve. Times are all jumbled together.

User avatar
snscott
rank: 50+ posts
rank: 50+ posts
Posts: 60
Joined: Sun May 24, 2009 2:15 pm
Reputation: 0
Location: Great Republic Of Texas
Real name: Steven Scott
Gender: Male

Postby snscott » Fri Nov 06, 2009 10:06 pm

RockHardTen wrote:hmmmm.... can't get it to look like ur pic steve. Times are all jumbled together.


Try tweaking the Line Spacing parameter

User avatar
RockHardTen
rank: <50 posts
rank: <50 posts
Posts: 29
Joined: Thu Jun 18, 2009 8:31 pm
Reputation: 0
Gender: Male

Postby RockHardTen » Fri Nov 06, 2009 10:28 pm

alright i figured it out. thx

User avatar
snscott
rank: 50+ posts
rank: 50+ posts
Posts: 60
Joined: Sun May 24, 2009 2:15 pm
Reputation: 0
Location: Great Republic Of Texas
Real name: Steven Scott
Gender: Male

SNS BREAKOUT BOXES

Postby snscott » Fri Nov 06, 2009 11:17 pm

Moved SNS_BREAKOUT_BOXES indiator to separate thread topic: http://kreslik.com/forums/viewtopic.php?p=30090#30090
Last edited by snscott on Tue Nov 10, 2009 4:38 am, edited 3 times in total.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “MetaTrader”