[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] How do I add a Day of week text to my intra day chart?


  • Date: Wed, 02 Dec 2009 20:16:09 -0000
  • From: "nwemail27" <neilw@xxxxxxxxxx>
  • Subject: [amibroker] How do I add a Day of week text to my intra day chart?

PureBytes Links

Trading Reference Links

Hi,
I have tried the following but it is not quite there.
It always puts todays date in the top left corner. What I want is a text field that moves with the chart. This way I can scroll back through the bars and see the day of the week printed in the top left corner at the start of each new day.

function DOWasStr ()
{
DOW = Now(9);
  switch(doW) { 
    case 1: St="Sunday"; break;
    case 2: St="Monday"; break;
    case 3: St="Tuesday";break; 
    case 4: St="Wednesday"; break;
    case 5: St="Thursday"; break;
    case 6: St="Friday"; break;
    case 7: St="Saturday"; break;
   } 
  return (St);
};

_SECTION_BEGIN("DOW");
AddTextColumn( Now(), "Current1 time"); 
GfxSelectFont("Times New Roman", 16, 700, True ); 

NewDay = Day()!= Ref(Day(), -1);

if (newday=True)
	GfxTextOut("DOW="+Now(0)+"-"+DOWasStr(), 10, 20 ); 

// Following is some diagnostic informatin, trying to find the start of a new day.
ToolTip=StrFormat(	"NewDay %g\n", newday);
ToolTip=StrFormat(	"Day %g\n", Day());
ToolTip=StrFormat(	"Day-1 %g\n", Day()-1);

_SECTION_END();



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/