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

Reply
Old 09-29-2009, 09:06 AM   #1

Join Date: Dec 2008
Location: athens
Posts: 54
Ignore this user

Thanks: 0
Thanked 4 Times in 3 Posts



Day Counter in Minute Charts

hi guys

does anybody know how to create a back wards day counter in minute charts that will count starting from current day equals N down to 1 ?
if N is 5 lets say
current day on chart will be 5 previous day will be 4 etc down to 1 and
then the loop will restart 6 day previous to current day at 5 again..

note that at the beginning of each trading day the counter should be recalculated to 5

the following code is counting forward from 1 to 5 and current day increments by one each trading day untill 5 is reached and then resets to 1..
i dont know if a backwards counter is possible though..

if date > date[1] then
datecnt = datecnt + 1;
if datecnt > 5 then
datecnt = 1 ;


regards
andypap is offline  
Reply With Quote
Old 09-29-2009, 10:03 AM   #2

Tams's Avatar

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

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Day Counter in Minute Charts

---------- deleted by tams ----------
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...

Last edited by Tams; 09-29-2009 at 10:49 AM.
Tams is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading with Market Statistics VIII. Counter Trend Trades in Symmetric Distributions jperl Market Profile 48 04-11-2011 04:02 PM
Variable Counter Array andypap Coding Forum 14 10-03-2009 08:23 PM
Tick Counter for Multicharts? daedalus Coding Forum 5 06-20-2009 12:25 PM
Tick Counter for Tradestation dow(n) Coding Forum 2 02-16-2008 05:17 PM
DEC 14 EUR/USD 5 minute CHARTING GalvestonForex Forex Trading Laboratory 1 12-15-2006 02:31 AM

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