How to locate a text on the left/right top/bottom of screen

How to create strategies and indicators
Message
Author
Wessel
Posts: 63
Joined: Tue Oct 12, 2010 6:45 pm

How to locate a text on the left/right top/bottom of screen

#1 Postby Wessel » Fri Jul 29, 2011 4:38 pm

Hi,

Is there a way to preferably C++ api but delphi is fine too. How i can put a textObject through the API on the top or bottom of the screen in one of the corners ?

Many thanks in advance


Wessel

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#2 Postby FT Support » Mon Aug 01, 2011 8:08 am

Please see Delphi code example below:

Code: Select all

    if not ObjectExists(ObjName) then
      begin
       ObjectCreate(ObjName, OBJ_TEXT, 0,1,Ydist);
       ObjectSet(ObjName,OBJPROP_COLOR,Color);
       ObjectSet(ObjName, OBJPROP_VALIGNMENT, tlBottom);
       ObjectSet(ObjName, OBJPROP_HALIGNMENT, taRightJustify);
       ObjectSetText(ObjName,Comm, FontSize, 'Arial', Color);
       ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
       ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, 1);
       ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, 1);
      end


let me know if you need any details
Check our other product here:
http://www.forexcopier.com

Phil_Trade
Posts: 94
Joined: Tue Jan 31, 2012 5:14 am
Contact:

#3 Postby Phil_Trade » Thu May 31, 2012 12:22 pm

FT Support wrote:Please see Delphi code example below:

Code: Select all

    if not ObjectExists(ObjName) then
      begin
       ObjectCreate(ObjName, OBJ_TEXT, 0,1,Ydist);
       ObjectSet(ObjName,OBJPROP_COLOR,Color);
       ObjectSet(ObjName, OBJPROP_VALIGNMENT, tlBottom);
       ObjectSet(ObjName, OBJPROP_HALIGNMENT, taRightJustify);
       ObjectSetText(ObjName,Comm, FontSize, 'Arial', Color);
       ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
       ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, 1);
       ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, 1);
      end


Hi

How can I put ObjectText at a specific scren coordonate ?

and where Can I find Help about above function you use ?
OBJPROP_SCRVALIGNMENT
OBJPROP_SCRHALIGNMENT
etc I cant' find in the Help ?

thanks

Philippe

let me know if you need any details
my live account - 8 based pairs with optimized parameters : +188%
http://www.myfxbook.com/members/Philipp ... jpg/519044
TradeSlide : http://bit.ly/14R9Nf6

to be informed about Windev/MT4 services : a04486-tradingsignal@yahoo.fr

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#4 Postby FT Support » Thu May 31, 2012 12:59 pm

Hello Philippe,

Please create the text object and set such properties for it:

1) ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
this means that the coordinates of the object are not based on time and price but are based on the chart dimensions.

2) ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, <value in pixels here>);
ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, <value in pixels here>);
these instructions will define the position of the object in chart coordinates
Check our other product here:
http://www.forexcopier.com

Phil_Trade
Posts: 94
Joined: Tue Jan 31, 2012 5:14 am
Contact:

#5 Postby Phil_Trade » Thu May 31, 2012 1:56 pm

FT Support wrote:Hello Philippe,

Please create the text object and set such properties for it:

1) ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
this means that the coordinates of the object are not based on time and price but are based on the chart dimensions.

2) ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, <value in pixels here>);
ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, <value in pixels here>);
these instructions will define the position of the object in chart coordinates


Thks for quick reply but I can get rid of this mess

I have create a procedure like this :

Code: Select all

procedure AfficheText(ObjName : string ; Texte : string; PosV : Integer ; PosH : integer; FontSize : integer ; Couleur : integer)  stdcall;
begin

//if (FontSize=0) then FontSize := 12;
if (Couleur=0) then Couleur := 1;

 if not ObjectExists(ObjName) then
      begin
       ObjectCreate(ObjName, OBJ_TEXT, 0,0,0);

       // spécifie gestion pixel écran
       ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
       // Fixe les coordonnées en pixels
       ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, PosH);
       ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, PosV);

       ObjectSet(ObjName,OBJPROP_COLOR,Couleur);

      end;

end;


and when I call it from GetSingleTick with

Code: Select all

  SetCurrencyAndTimeframe('EURUSD', 240);

  AfficheText('Object01', 'PHILIPPE', V , H , 14 , clGreen);


nothing happen. What I am missing ?

my live account - 8 based pairs with optimized parameters : +188%

http://www.myfxbook.com/members/Philipp ... jpg/519044

TradeSlide : http://bit.ly/14R9Nf6



to be informed about Windev/MT4 services : a04486-tradingsignal@yahoo.fr

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#6 Postby FT Support » Thu Jun 07, 2012 3:31 am

Please remove these code lines:

Code: Select all

ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, PosH);
ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, PosV);


You can set coordinates with

Code: Select all

ObjectSet(textInCorner, OBJPROP_TIME1, PosH);
ObjectSet(textInCorner, OBJPROP_PRICE1, PosV);


OBJPROP_SCRHALIGNMENT and OBJPROP_SCRVALIGNMENT parameters are used for setting vertical and horizontal alignment and these parameters can only have values from 0 to 2:

    OBJPROP_SCRHALIGNMENT = 0 – no horizontal alignment
    OBJPROP_SCRHALIGNMENT = 1 –align to right
    OBJPROP_SCRHALIGNMENT = 2 –align to left
    OBJPROP_SCRVALIGNMENT = 0 – no vertical alignment
    OBJPROP_SCRVALIGNMENT = 1 –align to bottom
    OBJPROP_SCRVALIGNMENT = 2 –align to top
Check our other product here:
http://www.forexcopier.com

charvo
Posts: 52
Joined: Tue Dec 04, 2012 1:15 pm

#7 Postby charvo » Thu Dec 27, 2012 10:55 pm

Phil, i know this is a long time ago thread

but is it the problem of missing "ObjectSetText()"?(after the objectcreate())

seems to me your 'Texte' is never used in your code...... it should be the contents of the 'ObjName', is that right?

Phil_Trade wrote:I have create a procedure like this :

Code: Select all

procedure AfficheText(ObjName : string ; Texte : string; PosV : Integer ; PosH : integer; FontSize : integer ; Couleur : integer)  stdcall;
begin

//if (FontSize=0) then FontSize := 12;
if (Couleur=0) then Couleur := 1;

 if not ObjectExists(ObjName) then
      begin
       ObjectCreate(ObjName, OBJ_TEXT, 0,0,0);

       // spécifie gestion pixel écran
       ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);
       // Fixe les coordonnées en pixels
       ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, PosH);
       ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, PosV);

       ObjectSet(ObjName,OBJPROP_COLOR,Couleur);

      end;

end;


and when I call it from GetSingleTick with

Code: Select all

  SetCurrencyAndTimeframe('EURUSD', 240);

  AfficheText('Object01', 'PHILIPPE', V , H , 14 , clGreen);


nothing happen. What I am missing ?


KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

procedure AfficheText is your answer

#8 Postby KelvinHand » Fri Dec 28, 2012 6:42 pm

charvo wrote:Phil, i know this is a long time ago thread

but is it the problem of missing "ObjectSetText()"?(after the objectcreate())

seems to me your 'Texte' is never used in your code...... it should be the contents of the 'ObjName', is that right?



What you missing is the post replied above you by FT Support that you choose to skip the answer:
You can set coordinates with

Code:
ObjectSet(textInCorner, OBJPROP_TIME1, PosH);
ObjectSet(textInCorner, OBJPROP_PRICE1, PosV);



Code: Select all

procedure AfficheText(ObjName : string ; Texte : string; PosV : Integer ; PosH : integer; FontSize : integer=12 ; Couleur : integer=clWhite)  stdcall;
begin


 if not ObjectExists(ObjName) then
       ObjectCreate(ObjName, OBJ_TEXT, 0,0,0);

       // spécifie gestion pixel écran
       ObjectSet(ObjName,OBJPROP_SCREENCOORDS,1);

       // Fixe les coordonnées en pixels
       ObjectSet(ObjName, OBJPROP_TIME1, PosH);
       ObjectSet(ObjName, OBJPROP_PRICE1, PosV);

     ObjectSet(ObjName, OBJPROP_VALIGNMENT, tlBottom);
     ObjectSet(ObjName,  OBJPROP_HALIGNMENT, taRightJustify);

     //--set to bottom right corner of the window
     ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, 1);
     ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, 1);

      ObjectSetText(ObjName, Texte, FontSize, 'Arial', Couleur);

   

end;   

Last edited by KelvinHand on Sat Dec 29, 2012 3:38 am, edited 3 times in total.

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

#9 Postby KelvinHand » Fri Dec 28, 2012 7:12 pm

The following Screen Horizontal/Vertical ALIGNMENT parameters listing is wrong except align to right and alighn to bottom:
FT Support wrote:OBJPROP_SCRHALIGNMENT and OBJPROP_SCRVALIGNMENT parameters are used for setting vertical and horizontal alignment and these parameters can only have values from 0 to 2:

    OBJPROP_SCRHALIGNMENT = 0 – no horizontal alignment
    OBJPROP_SCRHALIGNMENT = 1 –align to right
    OBJPROP_SCRHALIGNMENT = 2 –align to left
    OBJPROP_SCRVALIGNMENT = 0 – no vertical alignment
    OBJPROP_SCRVALIGNMENT = 1 –align to bottom
    OBJPROP_SCRVALIGNMENT = 2 –align to top


Should be the following Paramters:
    OBJPROP_SCRHALIGNMENT = 0 –align to left
    OBJPROP_SCRHALIGNMENT = 1 –align to right

    OBJPROP_SCRVALIGNMENT = 0 –align to top
    OBJPROP_SCRVALIGNMENT = 1 –align to bottom

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

To test the Obj_Text

#10 Postby KelvinHand » Fri Dec 28, 2012 8:52 pm

Here to prove you:

Code: Select all

//---------------------------------------------------------------------------
// Example how to work with object Text from indicator
//---------------------------------------------------------------------------
library ObjectsTest;

uses
  SysUtils, graphics, IndicatorInterfaceUnit, TechnicalFunctions;

const
   SVA_TOP   = 0;
   SVA_BOT   = 1;

   SHA_LEFT  = 0;
   SHA_RIGHT = 1;
{
  tlTop           = 0;
  tlCenter        = 1;
  tlBottom        = 2;


  taLeftJustify   = 0;
  taRightJustify  = 1;
  taCenter        = 2;
 }

var

 Font_Name    : PChar;
 Font_Size    : Integer = 10;
 Font_Color   : TColor = clYellow;

 TxtLabel    : PChar;
 iX          : Integer = 16;
 iY          : Integer = 32;

 Text_Vert   : Integer = tlTop ;
 Text_Hori   : Integer = taLeftJustify;

 Screen_Vert : Integer = SVA_TOP;
 Screen_Hori : Integer = SHA_LEFT;



//---------------------------------------------------------------------------
// Initialize indicator
//---------------------------------------------------------------------------
procedure Init; stdcall;
begin
  // define properties
  IndicatorShortName('Label Demo1');
  SetOutputWindow(ow_ChartWindow);
  IndicatorBuffers(0);

  //----

  ReplaceStr(Font_Name, 'Comic Sans MS');

  ReplaceStr(TxtLabel, 'Created by KelvinHand - To demo the Window Corner !');



  // define properties
  AddSeparator('Label Setting');
  RegOption('Label',ot_String, TxtLabel);

  RegOption('Position X', ot_Integer, iX);
  RegOption('Position Y', ot_Integer, iY);


  AddSeparator('Font Setting');
  RegOption('Font Name',ot_String, Font_Name);


  RegOption('Font Size',ot_Integer, Font_Size);

  RegOption('Font Color',ot_Color, Font_Color);



  AddSeparator('Text Alignment');

  RegOption('Text Vert. Alignment', ot_EnumType, Text_Vert);
  AddOptionValue('Text Vert. Alignment', 'Top');
  AddOptionValue('Text Vert. Alignment', 'Center');
  AddOptionValue('Text Vert. Alignment', 'Bottom');

  RegOption('Text Hori. Alignment', ot_EnumType, Text_Hori);
  AddOptionValue('Text Hori. Alignment', 'Left');
  AddOptionValue('Text Hori. Alignment', 'Right');
  AddOptionValue('Text Hori. Alignment', 'Center');

  AddSeparator('Screen Alignment');

  RegOption('Screen Vert. Alignment', ot_EnumType, Screen_Vert);
  AddOptionValue('Screen Vert. Alignment', 'Top');
  AddOptionValue('Screen Vert. Alignment', 'Bottom');

  RegOption('Screen Hori. Alignment', ot_EnumType, Screen_Hori);
  AddOptionValue('Screen Hori. Alignment', 'Left');
  AddOptionValue('Screen Hori. Alignment', 'Right');


end;

//---------------------------------------------------------------------------
// Deinitialize indicator
//---------------------------------------------------------------------------
procedure Done; stdcall;
begin
 ObjectsDeleteAll(0);

end;

//---------------------------------------------------------------------------
// Calculate requested bar
//---------------------------------------------------------------------------
procedure Calculate(index: integer); stdcall;
var
  ObjName : String;
begin

  ObjName := 'Created By Kelvinhand';
  ObjectCreate(ObjName, obj_Text, 0, 0, 0);
  ObjectSet(ObjName, OBJPROP_SCREENCOORDS,1);
  ObjectSetText(ObjName, TxtLabel, Font_Size, Font_Name, Font_Color);
  ObjectSet(ObjName, OBJPROP_TIME1, iX);
  ObjectSet(ObjName, OBJPROP_PRICE1,iY);

  ObjectSet(ObjName, OBJPROP_VALIGNMENT, Text_Vert);
  ObjectSet(ObjName, OBJPROP_HALIGNMENT, Text_Hori);

  ObjectSet(ObjName, OBJPROP_SCRVALIGNMENT, Screen_Vert);
  ObjectSet(ObjName, OBJPROP_SCRHALIGNMENT, Screen_Hori);
 


end;


exports

Init, Done, Calculate;

end.

Attachments
ScreenAlignTest.dll
(97.5 KiB) Downloaded 842 times

charvo
Posts: 52
Joined: Tue Dec 04, 2012 1:15 pm

Re: To test the Obj_Text

#11 Postby charvo » Sat Dec 29, 2012 12:48 am

great! ForexTester should pay you, Kelvin!

Thanks, this is a great example for me!

Hold on, plz, I have a question following......

KelvinHand wrote:Here to prove you:

charvo
Posts: 52
Joined: Tue Dec 04, 2012 1:15 pm

Re: To test the Obj_Text

#12 Postby charvo » Sat Dec 29, 2012 1:00 am

Hi, Kelvin:

My question is "How to display multi-line text?"

I come from MQL4 on MT4. I tried to use mql4's way.

I coded a procedure first (like you've seen these two days)

Code: Select all

procedure HUDprojector1(note:string; colorcode: Tcolor; timecoord: integer; pricecoord: integer);
begin

   SetCurrencyAndTimeframe(sym[1], 60);

//   ObjectDelete(ObjHUDline1);
   ObjectCreate(ObjHUDline1, OBJ_TEXT, 0, 0, 0);

   ObjectSetText(ObjHUDline1, note, 9, 'Impact', colorcode);
   ObjectSet(ObjHUDline1, OBJPROP_SCREENCOORDS,3);

   ObjectSet(ObjHUDline1, OBJPROP_TIME1, timecoord);
   ObjectSet(ObjHUDline1, OBJPROP_PRICE1, pricecoord);

   ObjectSet(ObjHUDline1, OBJPROP_SCRVALIGNMENT, 0);
   ObjectSet(ObjHUDline1, OBJPROP_SCRHALIGNMENT, 0);

end;


then in [GetSingleTick()], I call the HUDprojector1() like below

Code: Select all

procedure GetSingleTick; stdcall;

begin

  infonote1 := 'Account Status; Balance: {' + floatToStr(AccountBalance) + '}; Equity:{' + floatToStr(AccountEquity) + '}; Float P/L: {' + floatToStr(AccountProfit) + '}';
  HUDprojector1(infonote1, clYellow, 400, 100);

  infonote1 := sym[1] + ' Slope:{' + floatToStr(pairSlope[1]) + '}; P/L:{' + floatToStr(PhantomPL[1]) + '};';
  HUDprojector1(infonote1, clYellow, 400, 85);

  infonote1 := sym[2] + ' Slope:{' + floatToStr(pairSlope[2]) + '}; P/L:{' + floatToStr(PhantomPL[2]) + '};';
  HUDprojector1(infonote1, clYellow, 400, 70);

  infonote1 := sym[3] + ' Slope:{' + floatToStr(pairSlope[3]) + '}; P/L:{' + floatToStr(PhantomPL[3]) + '};';
  HUDprojector1(infonote1, clYellow, 400, 55);

//....................

end;


as you see, I expect HUDprojector1() to write FOUR lines at Ycoord 100, 85, 70, 55 as the code calls it FOUR times. But what I got on screen is only the 4th line (Y @ 55).

There should be something wrong on my code since I think multi-line text seem doable in FT2. Just I am not sure where I did wrong.

My solution to this is very stupid. I can enumerate all lines that I want to display using many more variables and objectcreate(). but that's not elegant......

hope I made myself clear......
:oops:

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

Re: To test the Obj_Text

#13 Postby KelvinHand » Sat Dec 29, 2012 2:03 am

charvo wrote:Hi, Kelvin:

My question is "How to display multi-line text?"

I come from MQL4 on MT4. I tried to use mql4's way.

I coded a procedure first (like you've seen these two days)

then in [GetSingleTick()], I call the HUDprojector1() like below

as you see, I expect HUDprojector1() to write FOUR lines at Ycoord 100, 85, 70, 55 as the code calls it FOUR times. But what I got on screen is only the 4th line (Y @ 55).

There should be something wrong on my code since I think multi-line text seem doable in FT2. Just I am not sure where I did wrong.

My solution to this is very stupid. I can enumerate all lines that I want to display using many more variables and objectcreate(). but that's not elegant......

hope I made myself clear......
:oops:


PostPosted: Sat Dec 29, 2012 7:42 am Post subject: procedure AfficheText is your answer

Code: Select all

procedure HUDprojector1(objName, note:string; colorcode: Tcolor; timecoord: integer; pricecoord: integer);
begin

   //SetCurrencyAndTimeframe(sym[1], 60);

  if not ObjectExists(ObjName) then
   ObjectCreate(objName, OBJ_TEXT, 0, 0, 0);

   ObjectSetText(objName, note, 9, 'Impact', colorcode);
   ObjectSet(objName, OBJPROP_SCREENCOORDS,1);

   ObjectSet(objName, OBJPROP_TIME1, timecoord);
   ObjectSet(objName, OBJPROP_PRICE1, pricecoord);

   ObjectSet(objName, OBJPROP_SCRVALIGNMENT, 0);
   ObjectSet(objName, OBJPROP_SCRHALIGNMENT, 0);

end;

procedure GetSingleTick; stdcall;

begin

  infonote1 := 'Account Status; Balance: {' + floatToStr(AccountBalance) + '}; Equity:{' + floatToStr(AccountEquity) + '}; Float P/L: {' + floatToStr(AccountProfit) + '}';
  HUDprojector1('Dec 29th', infonote1, clYellow, 400, 100);

  infonote1 := sym[1] + ' Slope:{' + floatToStr(pairSlope[1]) + '}; P/L:{' + floatToStr(PhantomPL[1]) + '};';
  HUDprojector1('Dec 30th',infonote1, clYellow, 400, 85);

  infonote1 := sym[2] + ' Slope:{' + floatToStr(pairSlope[2]) + '}; P/L:{' + floatToStr(PhantomPL[2]) + '};';
  HUDprojector1('Dec 31th', infonote1, clYellow, 400, 70);

  infonote1 := sym[3] + ' Slope:{' + floatToStr(pairSlope[3]) + '}; P/L:{' + floatToStr(PhantomPL[3]) + '};';
  HUDprojector1('Happy New Year',infonote1, clYellow, 400, 55);

//....................

end;

charvo
Posts: 52
Joined: Tue Dec 04, 2012 1:15 pm

Re: To test the Obj_Text

#14 Postby charvo » Sat Dec 29, 2012 2:17 pm

Yes, indeed. Thank you, Kelvin. I finally make it all work.

KelvinHand wrote:PostPosted: Sat Dec 29, 2012 7:42 am Post subject: procedure AfficheText is your answer

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

Re: To test the Obj_Text

#15 Postby KelvinHand » Sat Dec 29, 2012 8:15 pm

charvo wrote:Yes, indeed. Thank you, Kelvin. I finally make it all work.

KelvinHand wrote:PostPosted: Sat Dec 29, 2012 7:42 am Post subject: procedure AfficheText is your answer


OK, So you are satisfy with my help. I will inform my secretary to send you the Service Payment. :D

charvo
Posts: 52
Joined: Tue Dec 04, 2012 1:15 pm

Re: To test the Obj_Text

#16 Postby charvo » Sun Dec 30, 2012 12:18 am

:wink: very satisfied, i'd do if i'm getting profitable soon

Thank you, Kelvin, and Happy New Year!

I also attach my code so that newcomers have some examples to consult. FT really did a poor job for the API help.

My code:

In "GetSinglTick", a procedure "HUDprojector1" is repeatedly called (11 times) to generate a multi-line (11 lines) text on the screen. All the variables are declared as global variables before "initstrategy", but not shown in the attached code.

Code: Select all

procedure HUDprojector1(objname:string; note:string; colorcode: Tcolor; timecoord: integer; pricecoord: integer) stdcall;
begin

   SetCurrencyAndTimeframe(sym[1], 60);

//   ObjectDelete(objname);
   ObjectCreate(objname, OBJ_TEXT, 0, 0, 0);

   ObjectSetText(objname, note, 9, 'Courier New Bold', colorcode);
   ObjectSet(objname, OBJPROP_SCREENCOORDS,1);

   ObjectSet(objname, OBJPROP_TIME1, timecoord);
   ObjectSet(objname, OBJPROP_PRICE1, pricecoord);

   ObjectSet(objname, OBJPROP_HALIGNMENT, taLeftJustify);

   ObjectSet(objname, OBJPROP_SCRVALIGNMENT, 0);
   ObjectSet(objname, OBJPROP_SCRHALIGNMENT, 0);

end;

procedure GetSingleTick; stdcall;

begin

  //SetCurrencyAndTimeframe(sym[1], 60);

  ObjHUDline1 := 'HUD';
  infonote1 := 'Account Status; --Balance: <' + format('%8.1f', [AccountBalance]) + '>; --Equity: <' + format('%8.1f', [AccountEquity]) + '>; --Float P/L: <' + format('%7.1f', [AccountProfit]) + '>';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 50);

  ObjHUDline1 := 'HUD1';
  infonote1:= sym[1] + ' --Slope:<' + format('%6.3f', [pairSlope[1]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[1]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 70);

  ObjHUDline1 := 'HUD2';
  infonote1:= sym[2] + ' --Slope:<' + format('%6.3f', [pairSlope[2]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[2]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 90);

  ObjHUDline1 := 'HUD3';
  infonote1:= sym[3] + ' --Slope:<' + format('%6.3f', [pairSlope[3]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[3]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 110);

  ObjHUDline1 := 'HUD4';
  infonote1:= sym[4] + ' --Slope:<' + format('%6.3f', [pairSlope[4]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[4]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 130);

  ObjHUDline1 := 'HUD5';
  infonote1:= sym[5] + ' --Slope:<' + format('%6.3f', [pairSlope[5]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[5]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 150);

  ObjHUDline1 := 'HUD6';
  infonote1:= sym[6] + ' --Slope:<' + format('%6.3f', [pairSlope[6]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[6]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 170);

  ObjHUDline1 := 'HUD7';
  infonote1:= sym[7] + ' --Slope:<' + format('%6.3f', [pairSlope[7]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[7]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 190);

  ObjHUDline1 := 'HUD8';
  infonote1:= sym[8] + ' --Slope:<' + format('%6.3f', [pairSlope[8]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[8]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 210);

  ObjHUDline1 := 'HUD9';
  infonote1:= sym[9] + ' --Slope:<' + format('%6.3f', [pairSlope[9]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[9]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 230);

  ObjHUDline1 := 'HUD10';
  infonote1:= sym[10] + ' --Slope:<' + format('%6.3f', [pairSlope[10]]) + '>; --P/L:<' + format('%7.2f', [PhantomPL[10]]) + '>;';
  HUDprojector1(ObjHUDline1, infonote1, clYellow, 200, 250);




It looks like the attached image.

KelvinHand wrote:
OK, So you are satisfy with my help. I will inform my secretary to send you the Service Payment. :D
Attachments
11lines.JPG
11lines.JPG (258.15 KiB) Viewed 36583 times


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 27 guests