Page 1 of 2

SNS_LOCALTIME

Posted: Mon Oct 26, 2009 2:02 am
by snscott
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.

Posted: Mon Oct 26, 2009 2:28 am
by Patch
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

SNS_LOCALTIME UPDATED

Posted: Tue Oct 27, 2009 3:37 am
by snscott
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! :-)

Posted: Fri Nov 06, 2009 6:50 pm
by cr0cop
thanks for the indicator

Posted: Fri Nov 06, 2009 8:21 pm
by Patch
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

Posted: Fri Nov 06, 2009 8:59 pm
by glenngie
that's great!!!

Posted: Fri Nov 06, 2009 9:52 pm
by RockHardTen
hmmmm.... can't get it to look like ur pic steve. Times are all jumbled together.

Posted: Fri Nov 06, 2009 10:06 pm
by snscott
RockHardTen wrote:hmmmm.... can't get it to look like ur pic steve. Times are all jumbled together.


Try tweaking the Line Spacing parameter

Posted: Fri Nov 06, 2009 10:28 pm
by RockHardTen
alright i figured it out. thx

SNS BREAKOUT BOXES

Posted: Fri Nov 06, 2009 11:17 pm
by snscott
Moved SNS_BREAKOUT_BOXES indiator to separate thread topic: http://kreslik.com/forums/viewtopic.php?p=30090#30090