Names of the days of the week

Indicators coded by community members
Message
Author
yameen.forex
Posts: 10
Joined: Tue Dec 25, 2012 9:33 pm

Names of the days of the week

#1 Postby yameen.forex » Mon Oct 20, 2014 10:37 pm

Hi all,

Wondering does anyone has an indicator Names of the days of the week being painted onto onto an hourly chart as a Text Label? Like Mon, Tue, Wed, etc.. I know, we can see this detail for a running candle, but I would like to get this printed for the previous days for an easy reference.

Your help would be very much appreciated.

Regards
Yam

FX Helper
Posts: 1377
Joined: Mon Apr 01, 2013 3:55 am

Re: Names of the days of the week

#2 Postby FX Helper » Tue Oct 21, 2014 7:07 am

Hello,

You can contact with our programmer via email services@forextester.com and send him details of this indicator so he can help you.

yameen.forex
Posts: 10
Joined: Tue Dec 25, 2012 9:33 pm

Re: Names of the days of the week

#3 Postby yameen.forex » Sun Oct 26, 2014 2:35 am

I don't have to pay to a programmer just to display the Week day name. I can try to write myself!

FX Helper
Posts: 1377
Joined: Mon Apr 01, 2013 3:55 am

Re: Names of the days of the week

#4 Postby FX Helper » Mon Oct 27, 2014 10:14 am

Ok, no problem, we provide Delphi and C++ API for writing indicators
You can find API files in <Forex Tester folder>\Examples\Indicators folder.
Please see more information about API here:
Forex Tester -> Help -> Indicators API

FT_TheWorld
Posts: 3
Joined: Sun Jan 25, 2015 7:49 pm

Re: Names of the days of the week

#5 Postby FT_TheWorld » Tue Jan 27, 2015 6:19 pm

Hi,
I'm after the same indicator.
I've managed to write Delphi code to show days in different WingDing font.
I just dont know how to write a character under each bar. eg M

I've found examples where text is written to screen coordinates but i dont see how to write under a Bar coordinate.
I was wondering if anyone could provide an example.
Thanks,
Ant

User avatar
neHcioHep
Posts: 18
Joined: Sat Nov 21, 2009 5:49 pm
Contact:

Re: Names of the days of the week

#6 Postby neHcioHep » Wed Jan 28, 2015 5:49 pm

FT_TheWorld wrote:Hi,
I'm after the same indicator.
I've managed to write Delphi code to show days in different WingDing font.
I just dont know how to write a character under each bar. eg M

I've found examples where text is written to screen coordinates but i dont see how to write under a Bar coordinate.
I was wondering if anyone could provide an example.
Thanks,
Ant


You can remove row in code where enabling sreen coordinates...
For example something like this

Code: Select all

ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);


in this case you can set coordinates based on price and time

FT_TheWorld
Posts: 3
Joined: Sun Jan 25, 2015 7:49 pm

Re: Names of the days of the week

#7 Postby FT_TheWorld » Thu Jan 29, 2015 12:30 pm

Thanks neHcioHep,
Can you please provide an example?

I ended up using WingDings for the time being.

Code attached.
Attachments
DayOfWeekIndicator.zip
(1.57 MiB) Downloaded 384 times

User avatar
neHcioHep
Posts: 18
Joined: Sat Nov 21, 2009 5:49 pm
Contact:

Re: Names of the days of the week

#8 Postby neHcioHep » Mon Feb 02, 2015 3:23 pm

FT_TheWorld wrote:Thanks neHcioHep,
Can you please provide an example?

I ended up using WingDings for the time being.

Code attached.


In your case you should use some another way :)

Code: Select all


//---------------------------------------------------------------------------
// Initialization procedure
//---------------------------------------------------------------------------
procedure Init; stdcall;
begin
  // ...
  SetOutputWindow(ow_ChartWindow);   
  // ...
end;


//---------------------------------------------------------------------------
// Calculate single bar
//---------------------------------------------------------------------------
procedure Calculate(index: integer); stdcall;
var bufValue : double;
begin

  dMoDayOfWeekBuffer[index] := 0.0;
  dTuDayOfWeekBuffer[index] := 0.0;
  dWeDayOfWeekBuffer[index] := 0.0;
  dThDayOfWeekBuffer[index] := 0.0;
  dFrDayOfWeekBuffer[index] := 0.0;

  dtime := (DayOfTheWeek(Time(index)))  ;
  bufValue := Low(index) - 3*Point();

  if (dtime = 1  ) then // Monday
    dMoDayOfWeekBuffer[index] := bufValue ;

  if (dtime = 2  ) then
   dTuDayOfWeekBuffer[index] := bufValue ;

  if (dtime = 3  ) then
    dWeDayOfWeekBuffer[index] := bufValue ;

  if (dtime = 4  ) then
    dThDayOfWeekBuffer[index] := bufValue ;

  if (dtime = 5  ) then
    dFrDayOfWeekBuffer[index] := bufValue ;



end;


Return to “Indicators”

Who is online

Users browsing this forum: No registered users and 1 guest