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;
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme