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.
Session Countdown Clock
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Session Countdown Clock
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.
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.
Re: Session Countdown Clock
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
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){}
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Session Countdown Clock
Thanks Traderji, that little thing did it.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
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Session Countdown Clock
The PLN attachment is now enabled on the forum, you can export the file directly and attach here.Attachments:
SessionCountdown.txt [14.96 KiB]
Downloaded 30 times