viewtopic.php?f=1&p=41821&sid=059cc9301 ... 62d#p41819
I'm using the GetmachineTime.dll to capture the actual time of my pc. I then add 500 millisecond to this time and loop until actual time = Targettime.
It work very well until i try to stop it by turning off my indicator on the chart. Then, my Multicharts session froze and I have to close it.
Any modification I should do?
Is there a better way to create a 500 ms delay
Code: Select all
//Function MachineTime
DefineDLLFunc: "GetMachineTime.dll", Long,"MachineTimeMill";
MachineTime = MachineTimeMill;
//Indicator DisplayTime
Var:
TargetTime (0),
Delay (500);
Targettime = MachineTime + delay;
While Value1 =0 begin
if machinetime >= Targettime then
begin
print (Targettime);
Targettime = MachineTime + delay;
end;
end;
Martin