New Page 1
(AssignFile,
Rewrite, Writeln, CloseFile).
.
, .
, :
<TICKER>,<PER>,<DATE>,<TIME>,<OPEN>,<HIGH>,<LOW>,<CLOSE>
MICEX,D,19991112,000000,119.87000,119.87000,119.87000,119.87000
MICEX,D,19991115,000000,121.93000,121.93000,121.93000,121.93000
MICEX,D,19991116,000000,122.45000,122.45000,122.45000,122.45000
MICEX,D,19991117,000000,120.32000,120.32000,120.32000,120.32000
MICEX,D,19991118,000000,118.06000,118.06000,118.06000,118.06000
MICEX,D,19991119,000000,121.42000,121.42000,121.42000,121.42000
MICEX,D,19991122,000000,125.65000,125.65000,125.65000,125.65000
MICEX,D,19991123,000000,128.58000,128.58000,128.58000,128.58000
MICEX,D,19991124,000000,125.45000,125.45000,125.45000,125.45000
MICEX,D,19991125,000000,123.41000,123.41000,123.41000,123.41000 |
24.11.1999,
"Close" 125.45000.
.
19.11.1999 ( , ,
). :
(125.45000-121.42000)/121.42000*100/3=1,10635260528194
, ,
.
:
, Excel
.
TSaveDialog .
:
procedure TfrmMomentum.btnTestFileClick(Sender: TObject);
var VF:TextFile;
begin
if sdTextFile.Execute then
begin
AssignFile(VF, sdTextFile.FileName);
Rewrite(VF);
if FIndicator<>nil then FreeAndNil(FIndicator);
FIndicator:=TPASSMomentum.Create(seDT.Value,'Close');
FPriceSource.CurrentItemIndex:=seDT.Value+2;
FIndicator.PriceSource:=FPriceSource;
repeat
WriteLn(VF,DateTimeToStr(FPriceSource.GetDataByFieldName('DateTime')),', ',FIndicator.GetResultByFieldName('Value'));
until not FPriceSource.NextItem;
CloseFile(VF);
end;
end; |
, Excel
( momentum
100)*:

(
), , ,
.
, * ,
. 1274
"Microsoft Excel",
" Microsoft"
|