Программирование - это просто
Advertisement
arrow arrow , , arrow TPASSMomentum (Delphi 7: , private, protect)
08.02.2023 .
1:
C#
Delphi
Web-
Excel-
.
TPASSMomentum (Delphi 7: , private, protect) E-mail
megabax   
10.08.2009 .
New Page 1

TPASSMomentum (Delphi 7: ,  private, protected, )

.

PASSIndicators. TPASSIndicator. :

  TPASSIndicator=Class(TPASSAbstractDataSource)
  private
    FParameters:TPASSParameters; //   .
    FPriceSource:TPASSPriceSource; //  .
    procedure SetPriceSource(APriceSource:TPassPriceSource);
    procedure UpdateParameters; virtual; abstract;
  public
    constructor Create;
    property PriceSource:TPASSPriceSource read FPriceSource write SetPriceSource;
    procedure SetParameterByName(AParameterName:string; AParameterValue:Variant); virtual;
    function GetParameterByName(AParameterName:string):Variant; virtual;
    function GetResultByFieldName(AFieldName:string):double;  virtual; abstract;
    function GetResultByFieldNameAndIndex(FieldName:string; Index:LongInt):double;  virtual; abstract;
    function GetResultByFieldNum(AFieldName:integer):double; virtual; abstract;
    function GetResultByFieldNumAndIndex(FieldName:Integer; Index:LongInt):double; virtual; abstract;
    procedure First; virtual; abstract;
    procedure Last; virtual; abstract;
    function Next:boolean; virtual; abstract;
    function Prev:boolean; virtual; abstract;
    function GetIndicatorName:string; virtual; abstract;
    Destructor Destroy; virtual;
  end;

( ):

 

  TPASSIndicator=Class(TPASSAbstractDataSource)
  protected
    FParameters:TPASSParameters; //   .
    FPriceSource:TPASSPriceSource; //  .
    procedure SetPriceSource(APriceSource:TPassPriceSource);
    procedure UpdateParameters; virtual; abstract;
    procedure AfterConstruction; override;
  public
    constructor Create;
    property PriceSource:TPASSPriceSource read FPriceSource write SetPriceSource;
    procedure SetParameterByName(AParameterName:string; AParameterValue:Variant); virtual;
    function GetParameterByName(AParameterName:string):Variant; virtual;
    function GetResultByFieldName(AFieldName:string):double;  virtual; abstract;
    function GetResultByFieldNameAndIndex(FieldName:string; Index:LongInt):double;  virtual; abstract;
    function GetResultByFieldNum(AFieldName:integer):double; virtual; abstract;
    function GetResultByFieldNumAndIndex(FieldName:Integer; Index:LongInt):double; virtual; abstract;
    procedure First; virtual; abstract;
    procedure Last; virtual; abstract;
    function Next:boolean; virtual; abstract;
    function Prev:boolean; virtual; abstract;
    function GetIndicatorName:string; virtual; abstract;
    Destructor Destroy; virtual;
  end;

AfterConstruction

procedure TPASSIndicator.AfterConstruction;
begin
   UpdateParameters;
end;    

AfterConstruction TPASSMomentum. FParameters FPriceSource - TPASSIndicator.

"" -

lbResult.Caption:= intToStr(FIndicator.GetParameterByName('Value'));

, .

lbResult.Caption:= FloatToStr(FIndicator.GetResultByFieldName('Value'));

, GetParameterByName, GetResultByFieldName.

:

  TPASSMomentum (Delphi 7: ,  private, protected, )

, , , . , 'PriceFieldType' dvtcnj PriceFieldType. , "PriceFieldType", , , , PriceFieldType.

. "Search" --> "Find"*

  TPASSMomentum (Delphi 7: ,  private, protected, )

*:

  TPASSMomentum (Delphi 7: ,  private, protected, )

:

Pbeg:=FPriceSource.GetDataByFieldNameAndIndex(FPriceFieldType,FPriceSource.CurrentItemIndex-FDT);
 

, . :

  TPASSMomentum (Delphi 7: ,  private, protected, )

, . , . .

 


, * ,   . 1274 "Delphi", "Borland Software Corporation".

 

( 27.07.2013 . )
 
« .   . »
 
© 2023 Программирование - это просто
Joomla! - , GNU/GPL.
© 2005-2008 Joom.Ru - Joomla!
Design by Mamboteam.com | Powered by Mambobanner.de
  .