Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 05-04-2009, 07:33 AM   #1

Harlequin's Avatar

Join Date: Apr 2008
Location: London
Posts: 77
Ignore this user

Thanks: 23
Thanked 15 Times in 11 Posts

PowerLanguage/EL How to Recalculate at Session Close

I currently use

if Date <> Date[1] then begin

to get an indicator to update at the end of each day, but that means I have to wait to midnight for values to be updated. I'm trying to get this to happen at 4:30PM when Globex reopens. Is there any way of using the session end time instead?
Harlequin is offline  
Reply With Quote
Old 05-04-2009, 07:40 AM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: PowerLanguage/EL How to Recalculate at Session Close

yes...

here are the session related keywords
(some might be MultiCharts specific)

Sess1EndTime
Sess1FirstBarTime
Sess1StartTime
Sess2EndTime
Sess2FirstBarTime
Sess2StartTime
SessionCount
SessionCountMS
SessionEndDay
SessionEndDayMS
SessionEndTime
SessionEndTimeMS
SessionLastBar
SessionStartDay
SessionStartDayMS
SessionStartTime
SessionStartTimeMS
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
Harlequin (05-04-2009)
Old 05-04-2009, 07:42 AM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: PowerLanguage/EL How to Recalculate at Session Close

you might try this one:





SessionEndTime

Returns a numerical value, indicating the time of the day that the specified session ends.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.

Usage

SessionEndTime( SessionType , SessionNum )

Where:
SessionType - a numerical expression: 0 = Auto Detect, 1 = Regular Session*
SessionNum - a numerical expression specifying the Session Number

* Custom Sessions parameters will be used if selected in QuoteManager.

Example

Assign a value, indicating the time of the day that the 4th regular session ends, to Value1 variable:

Value1 = SessionEndTime(1,4);
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
Harlequin (05-04-2009)
Old 05-04-2009, 07:46 AM   #4

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: PowerLanguage/EL How to Recalculate at Session Close

You might also look for a thread that discusses plotting globex highs and lows. Several tricks and tips related to session times where discussed there.
BlowFish is offline  
Reply With Quote
The Following User Says Thank You to BlowFish For This Useful Post:
Harlequin (05-04-2009)
Old 05-04-2009, 08:06 AM   #5

Harlequin's Avatar

Join Date: Apr 2008
Location: London
Posts: 77
Ignore this user

Thanks: 23
Thanked 15 Times in 11 Posts

Re: PowerLanguage/EL How to Recalculate at Session Close

Thanks for help. Looks like Sess1StartTime is what I need to use, I'm just having a problem making a loop which increments each every day at that time. I'll search for that thread on Globex high/lows and see what I can find.

Cheers.
Harlequin is offline  
Reply With Quote
Old 05-04-2009, 08:13 AM   #6

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: PowerLanguage/EL How to Recalculate at Session Close

I'm pretty sure that will see you right. It had several approaches with complete code.
BlowFish is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning a Buy into a SellShort (PowerLanguage) hrokling Coding Forum 2 02-27-2009 03:40 AM
High, Low, Close for Sept ES? TraderBG Beginners Forum 7 10-15-2008 12:36 AM
Difference Between Closed(1) and Close[1] sevensa Coding Forum 2 05-21-2008 12:38 PM
What happened after market close? TinGull General Discussion 4 01-10-2007 08:06 PM
Futures Hi/LO/Close Bfbusa Market Analysis 2 12-05-2006 07:32 PM

All times are GMT -4. The time now is 01:05 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.