Session Countdown Clock

Traderji
Posts: 41
Joined: 08 Mar 2012
Has thanked: 6 times
Been thanked: 17 times

Session Countdown Clock

Postby Traderji » 07 Aug 2012

This will create a countdown clock on the toolbar for each main trading centre around the world - Sydney, Tokyo, London & NYC.

If the clock is coloured red then the session is currently closed and the clock will countdown to session open. When session opens, the clock becomes coloured in green and the clock will countdown to session close. The open and close times are local to each city. I use the following

Sydney 8am-4pm
Tokyo 9am-6pm
London 8am-5pm
NYC 8am-5pm

You can change the start/end times in code.

Image
Attachments
SessionCountdown.txt
(14.96 KiB) Downloaded 908 times

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Session Countdown Clock

Postby JoshM » 07 Aug 2012

Thanks Traderji, that looks great!

But have other users succeeded in compiling this file? I've made a new indicator in the .NET Editor (named 'SessionCountDown'), copy-pasted the whole txt file in it, saved, and pressed Compile. However, if I now go to the Insert Study screen (F7) it shows the indicator as not compiled. There are no errors in both the MC .NET editor and VS.

I've tried this multiple times, and after each compile the MC .NET editor says "Build succeeded", while the indicator maintains its Ready Status: No.

Traderji
Posts: 41
Joined: 08 Mar 2012
Has thanked: 6 times
Been thanked: 17 times

Re: Session Countdown Clock

Postby Traderji » 07 Aug 2012

I think it is because you have 'D' in upper case in name of the indicator "SessionCountDown"

Try deleting that indicator and create a new one name "SessionCountdown" 'd' is lower case

Code: Select all

namespace PowerLanguage.Indicator{
public class SessionCountdown : IndicatorObject {
public SessionCountdown(object _ctx):base(_ctx){}

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Session Countdown Clock

Postby JoshM » 07 Aug 2012

I think it is because you have 'D' in upper case in name of the indicator "SessionCountDown"

Try deleting that indicator and create a new one name "SessionCountdown" 'd' is lower case
Thanks Traderji, that little thing did it. :)

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Session Countdown Clock

Postby Stan Bokov » 23 Aug 2012

Attachments:
SessionCountdown.txt [14.96 KiB]
Downloaded 30 times
The PLN attachment is now enabled on the forum, you can export the file directly and attach here.


Return to “User Contributed Studies”