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

Reply
Old 09-29-2009, 08: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, 09:03 AM   #2

Tams's Avatar

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

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

Re: Day Counter in Minute Charts

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



Only an idiot would reply to a stupid post

Last edited by Tams; 09-29-2009 at 09:49 AM.
Tams 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
Trading with Market Statistics VIII. Counter Trend Trades in Symmetric Distributions jperl Market Profile 48 04-11-2011 03:02 PM
Variable Counter Array andypap Coding Forum 14 10-03-2009 07:23 PM
Tick Counter for Multicharts? daedalus Coding Forum 5 06-20-2009 11:25 AM
Tick Counter for Tradestation dow(n) Coding Forum 2 02-16-2008 04:17 PM
DEC 14 EUR/USD 5 minute CHARTING GalvestonForex Forex Trading Laboratory 1 12-15-2006 01:31 AM

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