FuzzyTrade

MQL5プログラミング研究会の案内を目的としています。MQL5プログラミングミングをやさしく解説。要求工学から開発プロセスまで、オブジェクト指向の小さなプログラミングから説明。

MQL5プログラミングの要求分析のまとめ記事--------要求分析(データのビジュアル化)抽出01


要求分析(データのビジュアル化)抽出01
1.ゴール要求
(1)データのグラフを描きたい。
2.シナリオ要求
(1)チャートに表示したい。
3.要求定義
(1)ヒヤリングのみ。
技術の要求分析が行われていない。

#include<Graphics\Graphic.mqh> 

void OnStart()
  {   
   double x[]={0,1,2,3,4,5,6,7,8,9};
   double y[]={3,10,-23,-17,18,10,15,-10,2,5};
   GraphPlot(x,y);
  }
  
(隠蔽問題:探索が必要)
標準ライブラリGraphic.mqhにある、
GraphPlot関数を使用。


f:id:Fuzzy01:20180428211251j:plain



要求分析(データのビジュアル化)抽出01
1.ゴール要求
要求漏れ01
プロットではなく、
折れ線グラフにしてほしい。

#include<Graphics\Graphic.mqh> 

void OnStart()
  {
   CGraphic graphic;
   graphic.Create(0,"Graphic",0,30,30,700,300);
   double x[]={0,1,2,3,4,5,6,7,8,9};
   double y[]={3,10,-23,-17,18,10,15,-10,2,5};
   CCurve *curve=graphic.CurveAdd(x,y,CURVE_LINES);
   graphic.CurvePlotAll();
   graphic.Update();
  } 

(友連れ問題:クラスメンバーの探索が必要)
標準ライブラリGraphic.mqhにある、
CGraphicクラスのCreateメンバーを使用。

f:id:Fuzzy01:20180428211313j:plain

  

MyFuzzyTrade


要求分析(データのビジュアル化)抽出01
1.ゴール要求
要求漏れ02
線をもう少し太くしてほしい。

#include<Graphics\Graphic.mqh> 

void OnStart()
  {
   CGraphic graphic;
   graphic.Create(0,"Graphic",0,30,30,700,300);
   double x[]={0,1,2,3,4,5,6,7,8,9};
   double y[]={3,10,-23,-17,18,10,15,-10,2,5};
   CCurve *curve=graphic.CurveAdd(x,y,CURVE_LINES);
   curve.LinesWidth(5);
   graphic.CurvePlotAll();
   graphic.Update();
  }

f:id:Fuzzy01:20180428211336j:plain


要求分析(データのビジュアル化)抽出01
1.ゴール要求
要求漏れ03
(1)線を滑らかな線にしてほしい。
(要求漏れ01と矛盾するので、
瑕疵担保責任ではなく、
別件注文になる。

#include<Graphics\Graphic.mqh> 

void OnStart()
  {
   CGraphic graphic;
   graphic.Create(0,"Graphic",0,30,30,700,300);
   double x[]={0,1,2,3,4,5,6,7,8,9};
   double y[]={3,10,-23,-17,18,10,15,-10,2,5};
   CCurve *curve=graphic.CurveAdd(x,y,CURVE_LINES);       
   curve.LinesSmooth(true);  
   curve.LinesWidth(5);
   graphic.CurvePlotAll();
   graphic.Update();
  }  

f:id:Fuzzy01:20180428211353j:plain