Page 1 of 1

Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Thu Dec 15, 2016 8:17 pm
by chucky3sei
Hi everyone. Please help me.

I need rectangle shape's price data for my own indicator in FT3.
But I can't get rectangle shape's price 2 data.
It is equal to price 1 data.

The behavior of the problem appears both delphi and c++.

Program in delphi is as below

***********************************************************************************

library RecDataD;

uses
SysUtils, classes, graphics, windows, IndicatorInterfaceUnit;

var
// External variables

// Buffers
EMP: TIndexBuffer;


//---------------------------------------------------------------------------
// Initialize indicator
//---------------------------------------------------------------------------
procedure Init; stdcall;
begin
// define properties
IndicatorShortName('RecDataD');
SetOutputWindow(ow_ChartWindow);

// register options
AddSeparator('Common');


// create buffers
EMP := CreateIndexBuffer;

IndicatorBuffers(1);
SetIndexBuffer(0, EMP);
SetIndexStyle(0, ds_None, psSolid, 1, RGB($1E, $90, $FF));
SetIndexLabel(0, 'EMP');
end;

//---------------------------------------------------------------------------
// Deinitialize indicator
//---------------------------------------------------------------------------
procedure Done; stdcall;
begin

end;

//---------------------------------------------------------------------------
// Calculate requested bar
//---------------------------------------------------------------------------
procedure Calculate(index: integer); stdcall;
var
i, obj_total: integer;
pr1, pr2: double;
strObjName: string;

begin
EMP[index] := 0;

obj_total := ObjectsTotal;

for i:=0 to obj_total do begin
strObjName := ObjectName(i);
Print(strObjName);


if Pos('Rectangle',strObjName) <> 0 then
begin
pr1 := ObjectGet(strObjName, OBJPROP_PRICE1);
pr2 := ObjectGet(strObjName, OBJPROP_PRICE2);

Print(FloatToStr(pr1));
Print(FloatToStr(pr2));
end;

end;

end;

exports

Init, Done, Calculate;

end.

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Fri Dec 23, 2016 7:49 pm
by chucky3sei
Since there is no reply, I attach an execution result.

Result.png
Result.png (105.21 KiB) Viewed 8784 times

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Sun Dec 25, 2016 7:34 am
by FX Helper
Hello,

Thank you for the screenshot.

As I can see, there is a bug in the program, I've already asked our programmers to fix it, the issue will be resolved in one of the next program builds.

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Mon Dec 26, 2016 8:41 am
by chucky3sei
Thank you for your response

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Mon Mar 06, 2017 6:55 pm
by chucky3sei
Hi Ms./Mr. FX Helper

I think that this bug hasn't fixed yet.
I use version 3.0.0.26(2017.02.13).

When I put this indicator, for the first time the output data is right.
but while simulation is running, the data changes bad data.

Please ask your programmer use this indicator and check data.
I want to know that this bug is reproduced in your office.

I show again this indicator program here.

I wait this bug fixed for more than 2 months !!!!

I hope your quick responce.

Code: Select all

//---------------------------------------------------------------------------
// RecDataD Index indicator
//---------------------------------------------------------------------------
library RecDataD;

uses
  SysUtils, classes, graphics, windows, IndicatorInterfaceUnit;

var
  // External variables

  // Buffers
  EMP: TIndexBuffer;


//---------------------------------------------------------------------------
// Initialize indicator
//---------------------------------------------------------------------------
procedure Init; stdcall;
begin
  // define properties
  IndicatorShortName('RecDataD');
  SetOutputWindow(ow_ChartWindow);

  // register options
  AddSeparator('Common');


  // create buffers
  EMP := CreateIndexBuffer;

  IndicatorBuffers(1);
  SetIndexBuffer(0, EMP);
  SetIndexStyle(0, ds_None, psSolid, 1, RGB($1E, $90, $FF));
  SetIndexLabel(0, 'EMP');
end;

//---------------------------------------------------------------------------
// Deinitialize indicator
//---------------------------------------------------------------------------
procedure Done; stdcall;
begin

end;

//---------------------------------------------------------------------------
// Calculate requested bar
//---------------------------------------------------------------------------
procedure Calculate(index: integer); stdcall;
var
  i, obj_total: integer;
  pr1, pr2: double;
  strObjName: string;

begin
  EMP[index] := 0;

  obj_total := ObjectsTotal;

  for i:=0 to obj_total do begin
    strObjName := ObjectName(i);
    Print(strObjName);


    if Pos('Rectangle',strObjName) <> 0 then
    begin
      pr1 := ObjectGet(strObjName, OBJPROP_PRICE1);
      pr2 := ObjectGet(strObjName, OBJPROP_PRICE2);

      Print(FloatToStr(pr1));
      Print(FloatToStr(pr2));
    end;

  end;

end;

exports

Init, Done, Calculate;

end.


fig_version.png
fig_version.png (149.56 KiB) Viewed 8513 times


fig_output.png
fig_output.png (117.58 KiB) Viewed 8513 times

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Wed Mar 29, 2017 7:58 pm
by chucky3sei
Hi Ms./Mr. FX Helper

I'm waiting for yore reply.
I want to know whether this bug is reproduced in your office or not.

I recompile this source code using the newest IndicatorInterfaceUnit.ps file.
And I reinstall forexter 3.
But this bug is reproduced.

And even the ellipse shape's price 2 data, the same bug occurs.

Please tell me about situation.

Re: Rectangle Shape's price 2 data is equal to price 1 data in FT3

Posted: Thu Mar 30, 2017 1:13 am
by FX Helper
Hello,

Yes, our programmers have reproduced this issue on their side.
It is in the list of our improvements so it will be fixed in one of the next program builds.