I want to convert simple mq4 rectangle extender(align rectangle always to the right side of the screen) into forex tester
but it seems to help problem with my code,
it should extend to the right every tick,
here is the code,
Code: Select all
library Extender;
uses
SysUtils, graphics, IndicatorInterfaceUnit, TechnicalFunctions;
procedure Init; stdcall;
begin
IndicatorShortName('Extender');
SetOutputWindow(ow_ChartWindow);
end;
procedure Calculate(index: integer); stdcall;
var
i: integer;
begin
for i := ObjectsTotal-1 downto 0 do
begin
if ObjectType(ObjectName(i)) = obj_Rectangle then
ObjectSet(ObjectName(i), OBJPROP_TIME2, Time(0));
end;
end;
exports
Init, Calculate;
end.
would love to see this one solved,
Thanks you very much!