0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PriceSeriesProviderクラス

Last updated at Posted at 2019-02-20
using tsdata.marketdata;	//PriceServiceProviderクラスの名前空間
using elsystem;


var:
	//PriceSeriesProviderクラスをPSPをいう名前で宣言
	PriceSeriesProvider PSP( NULL );

method bool IsChart()
begin
//GetAppInfo()  指定したキーワードに基づいて、呼び出しているアプリケーションの属性を指す数値を返します。 
return ( GetAppInfo( aiApplicationType ) = cChart );
end;

method void Init()
begin
	CreatePSP();
end;

Method void createPSP()
Begin
PSP = new PriceSeriesProvider();
PSP.Symbol = Symbol;
AlignPSP( PSP );

PSP.IncludeTicksInfo = false; 
PSP.IncludeVolumeInfo = true;
PSP.UseNaturalHours = false;
PSP.Realtime = true;

PSP.LoadProvider();
end;
method void AlignPSP( PriceSeriesProvider PSPToAlign )
begin

	if AnalysisTechnique.DataStreams.DefaultStream.UsesNaturalHours then
		RaiseRuntimeError( Name + " " + !( "cannot be used with natural hours selected." ) );

	PSPToAlign.Interval = DataInterval.FromCurrentSymbolData( BarType, BarInterval );
	PSPToAlign.Range.FirstDate = BarDateTime[MaxBarsBack];

	PSPToAlign.SessionName = 
	 AnalysisTechnique.DataStreams.DefaultStream.SessionName;	
end;
//************************************************************
// プログラムルート開始
//************************************************************

once	//初期化
begin
	Init();

end;

//チャートかレーダースクリーンかを判定して分岐させる
if IsChart() then
Begin
plot1( PSP.Volume[0], !( "Volume" ) );
Setplotwidth(1,2);
end

Else
Begin

end;

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?