unageanu-jiji 1.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/ChangeLog +6 -1
  2. data/html/css/default.css +11 -0
  3. data/html/img/goto.gif +0 -0
  4. data/html/img/goto_o.gif +0 -0
  5. data/html/index.html +2 -2
  6. data/html/js/result-page.js +12 -6
  7. data/html/js/templates.js +10 -1
  8. data/html/js/utils.js +1 -1
  9. data/html/swf/chart.swf +0 -0
  10. data/lib/jiji/util/backtester.rb +116 -0
  11. data/swf/chart/fx/chart/Chart.as +12 -6
  12. data/swf/chart/fx/chart/model/Model.as +1 -1
  13. data/swf/chart/fx/chart/ui/Constants.as +3 -3
  14. data/swf/chart/fx/chart/ui/TradeDetailWindow.as +1 -1
  15. data/swf/chart/fx/chart/ui/TradeResult.as +43 -33
  16. data/swf/chart/fx/util/ListenerSupport.as +2 -2
  17. data/swf/chart/fx/util/PositionManager.as +1 -0
  18. data/test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +8 -0
  19. data/test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  20. data/test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  21. data/test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +10 -0
  22. data/test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv +20 -0
  23. data/test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv +20 -0
  24. data/test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +18 -0
  25. data/test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +8 -0
  26. data/test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  27. data/test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  28. data/test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +10 -0
  29. data/test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv +20 -0
  30. data/test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv +20 -0
  31. data/test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +18 -0
  32. data/test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +8 -0
  33. data/test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  34. data/test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +1 -0
  35. data/test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv +10 -0
  36. data/test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv +20 -0
  37. data/test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv +20 -0
  38. data/test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv +18 -0
  39. data/test/plugin/test_gem/a/lib/jiji_plugin_test.rb +6 -0
  40. metadata +58 -1
data/ChangeLog CHANGED
@@ -1,5 +1,10 @@
1
1
 
2
- 2009-8-15 1.2.0
2
+ 2009-8-15 1.2.2
3
+ * 取引結果の約定日時/決済日時から、その時点のチャートにジャンプする機能を追加しました。
4
+ * チャート上で取引の詳細を表示する際に、表示中の取引を強調表示するように修正しました。
5
+ * JSON-RPC APIを利用してバックテストの実行と結果の取得を行うユーティリティを追加しました。
6
+
7
+ 2009-8-15 1.2.1
3
8
  * エージェントエディタを一新
4
9
  - 複数のエージェントや共有ライブラリをタブで同時に編集できるようになりました。
5
10
  - エージェントや共有ライブラリをディレクトリで分類できるようになりました。
data/html/css/default.css CHANGED
@@ -520,6 +520,17 @@ span.draw {
520
520
  color : #978CD0;
521
521
  }
522
522
 
523
+ div.goto_chart * {
524
+ vertical-align: bottom;
525
+ line-height: 100%;
526
+ }
527
+ div.goto_chart a {
528
+ padding-right: 2px;
529
+ }
530
+ div.goto_chart img {
531
+ font-size: 0px;
532
+ }
533
+
523
534
  /** log --------------------------------------------------------------------- */
524
535
  div.log {
525
536
  overflow:scroll;
data/html/img/goto.gif ADDED
Binary file
Binary file
data/html/index.html CHANGED
@@ -106,12 +106,12 @@
106
106
  <div class="panel_780" style="margin-left:10px;">
107
107
  <div class="panel_top"></div>
108
108
  <div class="panel_middle" style="padding-left:10px;">
109
- <div>
109
+ <div style="line-height:0px;font-size:0px;">
110
110
  <!-- swf -->
111
111
  <object id='chart'
112
112
  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
113
113
  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'
114
- height='450px' width='780px'>
114
+ height='450px' width='780px' >
115
115
  <param name='src' value='/swf/chart.swf'/>
116
116
  <param name='flashVars' value=''/>
117
117
  <param name='scale' value='noscale'/>
@@ -444,16 +444,22 @@ fx.ui.TradeListTable.prototype = util.merge( util.BasicTable, {
444
444
  {key:"trader", label:columnTemplate.trader, sortable:true, resizeable:true,width:50,formatter: function( cell, record, column, data){
445
445
  cell.innerHTML = data ? data.escapeHTML() : "-";
446
446
  } },
447
- {key:"date", label:columnTemplate.date, sortable:true, resizeable:true,width:118, formatter: function( cell, record, column, data){
447
+ {key:"date", label:columnTemplate.date, sortable:true, resizeable:true,width:133, formatter: function( cell, record, column, data){
448
448
  var d = new Date(data*1000);
449
- cell.innerHTML = util.formatDate(d);
450
- //cell.innerHTML = '<a href="javascript:util.getSwf(\'chart\').setDate( ' + data + ' );scrollTo( 0, 0 );">' + util.formatDate(d) + '</a>';
449
+ cell.innerHTML = fx.template.Templates.submenu.trade.gotoChart.evaluate( {
450
+ "goto": fx.template.Templates.common.gotoChart,
451
+ data : data,
452
+ dateString : util.formatDate(d)
453
+ });
451
454
  } },
452
- {key:"fix_date", label:columnTemplate.fixDate, sortable:true, resizeable:true,width:118, formatter: function( cell, record, column, data){
455
+ {key:"fix_date", label:columnTemplate.fixDate, sortable:true, resizeable:true,width:133, formatter: function( cell, record, column, data){
453
456
  if (data) {
454
457
  var d = new Date(data*1000);
455
- cell.innerHTML = util.formatDate(d);
456
- //cell.innerHTML = '<a href="javascript:util.getSwf(\'chart\').setDate( ' + data + ' );scrollTo( 0, 0 );">' + util.formatDate(d) + '</a>';
458
+ cell.innerHTML = fx.template.Templates.submenu.trade.gotoChart.evaluate( {
459
+ "goto": fx.template.Templates.common.gotoChart,
460
+ data : data,
461
+ dateString : util.formatDate(d)
462
+ });
457
463
  } else {
458
464
  cell.innerHTML = "-";
459
465
  }
data/html/js/templates.js CHANGED
@@ -61,6 +61,9 @@ fx.template.Templates = {
61
61
  file: "ファイル",
62
62
  directory: "ディレクトリ"
63
63
  },
64
+ gotoChart : '<img src="./img/goto.gif" alt="移動" title="チャートをこの日時までスクロール"' +
65
+ ' onmouseover="this.src=\'./img/goto_o.gif\'" ' +
66
+ ' onmouseout="this.src=\'./img/goto.gif\'" />',
64
67
  errorMsg : {
65
68
  notFound: new Template("#{name}が見つかりませんでしました。"),
66
69
  alreadyExist: "名前が重複しています。",
@@ -346,7 +349,13 @@ fx.template.Templates = {
346
349
  ' <div class="breaker"></div></div>' +
347
350
  '</div>'),
348
351
  pair : new Template (
349
- '<tr><td class="label small" >#{pair}</td><td class="value">#{value}</td></tr>' )
352
+ '<tr><td class="label small" >#{pair}</td><td class="value">#{value}</td></tr>' ),
353
+ gotoChart : new Template(
354
+ '<div class="goto_chart">' +
355
+ ' <a href="javascript:util.getSwf(\'chart\').setDate( #{data} );">#{goto}</a>' +
356
+ ' <span class="date">#{dateString}</span>' +
357
+ '</div>'
358
+ )
350
359
  },
351
360
  graph : {
352
361
  noAgent : '<div style="margin:10px 0px 0px 0px;">( グラフはありません。)</div>',
data/html/js/utils.js CHANGED
@@ -446,7 +446,7 @@ util.formatDate = function( d ) {
446
446
  util.fillZero = function( number, size ) {
447
447
  var s = number != 0 ? Math.log( number ) * Math.LOG10E : 0;
448
448
  for( i=1,n=size-s,str="";i<n;i++ ) str += "0";
449
- return str+number;
449
+ return str+number.toString();
450
450
  }
451
451
 
452
452
  /**
data/html/swf/chart.swf CHANGED
Binary file
@@ -0,0 +1,116 @@
1
+ require "rubygems"
2
+ require "jiji/util/json_rpc_requestor"
3
+ require 'uuidtools'
4
+
5
+ module JIJI
6
+
7
+ #==jijiに接続してバックテストの実行と結果の取得を行うためのユーティリティ。
8
+ #jijiのJSON-RPC APIを利用してバックテストの実行と結果の取得を行うユーティリティです。
9
+ #
10
+ # require 'rubygems'
11
+ # require 'jiji/util/backtester'
12
+ #
13
+ # #接続先のjijiを指定して、テスターを作成
14
+ # tester = JIJI::BackTester.new( "http://unageanu.homeip.net/jiji-demo" )
15
+ #
16
+ # #エージェントを作成
17
+ # agents = []
18
+ # agents << tester.create_agent( "MovingAverageAgent", "moving_average_agent.rb",
19
+ # "移動平均_12-36", {"long"=>36,"period"=>10,"short"=>12})
20
+ # agents << tester.create_agent( "MovingAverageAgent", "moving_average_agent.rb",
21
+ # "移動平均_25-75", {"long"=>75,"period"=>10,"short"=>25})
22
+ #
23
+ # #テストを実行
24
+ # time = Time.local(2009, 8, 20).to_i
25
+ # process_id = tester.regist_test( "移動平均テスト2", "", time, time+24*60*60*3, agents )
26
+ #
27
+ # #テストの実行完了を待つ
28
+ # tester.wait( process_id )
29
+ #
30
+ # #結果を確認
31
+ # result = tester.get_result( process_id )
32
+ # result.each_pair {|k,v|
33
+ # puts "\n---#{k}"
34
+ # puts "profit or ross : #{v.profit_or_loss}"
35
+ # puts "positions : "
36
+ # v.positions.each {|p|
37
+ # puts " #{p["pair"]} #{p["sell_or_buy"]} #{p["profit_or_loss"]}"
38
+ # }
39
+ # }
40
+ #
41
+ class BackTester
42
+
43
+ #===コンストラクタ
44
+ #endpoint:: 接続先サーバーを示すエンドポイント 例) http://unageanu.homeip.net/jiji-demo
45
+ def initialize( endpoint )
46
+ @agent_service = JSONBroker::JsonRpcRequestor.new("agent", endpoint)
47
+ @process_service = JSONBroker::JsonRpcRequestor.new("process", endpoint)
48
+ @trade_result_service = JSONBroker::JsonRpcRequestor.new("trade_result", endpoint)
49
+ @agents = @agent_service.list_agent_class
50
+ end
51
+ #===エージェントの情報を取得する。
52
+ #class_name:: クラス名
53
+ #file:: クラスが定義されているファイル名
54
+ #return:: エージェントの情報/対応するエージェントがなければnil
55
+ def get_agent_info( class_name, file )
56
+ return @agents.find{|i|
57
+ i["class_name"]==class_name && i["file_name"]==file
58
+ }
59
+ end
60
+
61
+ #===バックテストに登録するためのエージェント情報を作成する。
62
+ #class_name:: クラス名
63
+ #file:: クラスが定義されているファイル名
64
+ #name:: エージェント名
65
+ #properties:: エージェントのプロパティ
66
+ #return:: バックテストに登録するためのエージェント情報
67
+ def create_agent( class_name, file, name, properties )
68
+ info = get_agent_info( class_name, file )
69
+ raise "agent not found." unless info
70
+ agent = info.dup
71
+ agent["id"] = UUIDTools::UUID.random_create().to_s
72
+ agent["class"] = "#{info["class_name"]}@#{info["file_name"]}"
73
+ agent["name"] = name
74
+ agent["property_def"] = agent["properties"].inject({}){|r,i|
75
+ r[i["id"]] = i
76
+ r
77
+ }
78
+ agent["properties"] = properties
79
+ return agent
80
+ end
81
+ #===バックテストを実行する。
82
+ #title:: テストの名前
83
+ #memo:: メモ
84
+ #start_time:: 開始日時(UNIXタイム/1970-01-01からの秒数)
85
+ #end_time:: 終了日時(UNIXタイム/1970-01-01からの秒数)
86
+ #agents:: 実行するエージェントの配列
87
+ #return:: バックテストの識別ID(process_id)
88
+ def regist_test( title, memo, start_time, end_time, agents )
89
+ return @process_service.new_test(
90
+ title, memo, start_time, end_time, agents )["id"]
91
+ end
92
+ #===バックテストの完了を待つ
93
+ #process_id:: バックテストの識別ID
94
+ def wait( process_id )
95
+ while ( true )
96
+ status = @process_service.status( [process_id] )[0]["state"]
97
+ return if status == "ERROR_END" || status == "FINISHED" || status == "CANCELED"
98
+ sleep 5
99
+ end
100
+ end
101
+ #===バックテストの実行結果を取得する。
102
+ #process_id:: バックテストの識別ID
103
+ #return:: エージェント名をキーとする実行結果のハッシュ
104
+ def get_result( process_id )
105
+ result = @trade_result_service.list( process_id, "5d", nil, nil )
106
+ return result.inject({}) {|r, item|
107
+ info = r[item["trader"]] ||= Result.new( 0, [] )
108
+ info.profit_or_loss += item["profit_or_loss"]
109
+ info.positions << item
110
+ r
111
+ }
112
+ end
113
+ #実行結果
114
+ Result = Struct.new( :profit_or_loss, :positions )
115
+ end
116
+ end
@@ -31,7 +31,7 @@ package fx.chart {
31
31
  private var rc:RenderingContext;
32
32
  private var autoUpdate:AutoUpdate;
33
33
  private var check:CheckBox;
34
-
34
+
35
35
  public function Chart(canvas:UIComponent){
36
36
 
37
37
  model = new Model();
@@ -94,7 +94,7 @@ package fx.chart {
94
94
  registExternalInterface();
95
95
  ExternalInterface.call( "onChartLoaded" );
96
96
  });
97
-
97
+
98
98
  } catch ( ex:Error ) {
99
99
  //log(ex.message + ":" + ex.getStackTrace());
100
100
  }
@@ -105,10 +105,16 @@ package fx.chart {
105
105
  private function registExternalInterface():void {
106
106
  ExternalInterface.addCallback("initializeChart", this.initializeChart );
107
107
  ExternalInterface.addCallback("setDate", function( date:Number ):void {
108
- ctrl.changeDate( Util.createDate(date) );
109
- pointer.setPosition(
110
- rc.stage.candle.left + (rc.stage.candle.width/2) + 11,
111
- rc.stage.candle.bottom - (rc.stage.candle.height/4));
108
+ var d:Date = Util.createDate(date);
109
+ var f:Function = function():void {
110
+ pointer.setPosition(
111
+ model.positionManager.fromDate( Math.floor( date / model.scaleTime) * model.scaleTime ) + rc.stage.candle.left,
112
+ rc.stage.candle.bottom - (rc.stage.candle.height/4));
113
+ ctrl.removeEventListener( fx.chart.ctrl.Event.CANDLE_DATA_CHANGED, arguments.callee );
114
+ }
115
+ ctrl.addEventListener( fx.chart.ctrl.Event.CANDLE_DATA_CHANGED, f);
116
+ ctrl.changeDate( d );
117
+ scroll.update();
112
118
  } );
113
119
  ExternalInterface.addCallback("setGraphVisible", this.setGraphVisible );
114
120
  ExternalInterface.addCallback("setGraphColors", this.setGraphColors );
@@ -85,7 +85,7 @@ package fx.chart.model {
85
85
  * 日時を設定する
86
86
  */
87
87
  public function set date(newData:Date):void {
88
- var tmp:Number = int(newData.getTime()/1000/scaleTime)*scaleTime;
88
+ var tmp:Number = Math.floor(newData.getTime()/1000/scaleTime)*scaleTime;
89
89
  if ( scaleTime ){
90
90
  var start:Number = tmp-COUNT/2*scaleTime;
91
91
  var end:Number = tmp+COUNT/2*scaleTime;
@@ -39,15 +39,15 @@ package fx.chart.ui {
39
39
  /**
40
40
  * 取引:+
41
41
  */
42
- public static const COLOR_UP:uint = 0xFE4B7E;//0xD65B7E;
42
+ public static const COLOR_UP:uint = 0xFE4072;//0xD65B7E;
43
43
  /**
44
44
  * 取引:-
45
45
  */
46
- public static const COLOR_DOWN:uint = 0x4B7EFF;//0x78A0D9;
46
+ public static const COLOR_DOWN:uint = 0x4072FF;//0x78A0D9;
47
47
  /**
48
48
  * 取引:同じ
49
49
  */
50
- public static const COLOR_DRAW:uint = 0x978CD0;//0x8C83c2;
50
+ public static const COLOR_DRAW:uint = 0x9283C5;//0x8C83c2;
51
51
 
52
52
  public static const COLOR_UP_3:uint = 0xE35080;
53
53
  public static const COLOR_UP_2:uint = 0xC46F8A;
@@ -113,7 +113,7 @@ package fx.chart.ui {
113
113
  buy.visible = true;
114
114
  }
115
115
  textFields["trader"].text = d["trader"] ? d["trader"] : "-";
116
- textFields["info"].text = " / " + d["pair"] + " / " + int( d["price"] / d["rate"]);
116
+ textFields["info"].text = " / " + d["pair"] + " / " + Math.ceil( d["price"] / (d["rate"] * 1000) )*1000;
117
117
  textFields["start"].text = d["rate"] + " " + formatDate( d["date"] );
118
118
  if ( d["fix_rate"] && d["fix_date"] ) {
119
119
  textFields["end"].text = d["fix_rate"] + " " + formatDate( d["fix_date"] );
@@ -85,13 +85,15 @@ package fx.chart.ui {
85
85
 
86
86
  var sprite:Sprite = new Sprite();
87
87
  var g:Graphics =sprite.graphics;
88
-
89
- var start:int = model.positionManager.fromDate( Math.ceil(d.date / model.scaleTime) * model.scaleTime );
88
+
89
+ // ポジション保有時の座標。表示範囲外の場合 < 0
90
+ var start:int = model.positionManager.fromDate( Math.floor(d.date / model.scaleTime) * model.scaleTime );
91
+ // ポジション決済時の座標。表示範囲外の場合 end+trade.left > trade.right
90
92
  var end:Number = 0;
91
93
  if ( d.fix_date ) {
92
- end = model.positionManager.fromDate( Math.ceil(d.fix_date / model.scaleTime) * model.scaleTime );
94
+ end = model.positionManager.fromDate( Math.floor(d.fix_date / model.scaleTime) * model.scaleTime );
93
95
  }
94
- var w:int = end - start + 4 < trade.width ? end - start + 4 : trade.width ;
96
+ var w:int = end - start + 4 < trade.width ? end - start + 4 : trade.width ; // 横幅。表示範囲より広い場合、表示幅
95
97
  var color:uint = getTradeColor(d);
96
98
 
97
99
  // 開始円
@@ -102,34 +104,39 @@ package fx.chart.ui {
102
104
  img.y = 0;
103
105
  sprite.addChild(img);
104
106
  }
105
-
106
- //
107
- var abs:Number = Math.abs( d.profit_or_loss);
108
- var left:int = NaN;
109
- if ( d.fix_date && (end+trade.left < trade.right) ) {
110
- if ( start > 0) {
111
- left = w-2;
112
- } else {
113
- left = end;
114
- }
115
- } else {
116
- if ( start > 0) {
117
- left = trade.width - start;
118
- } else {
119
- left = trade.width-1;
120
- }
121
- }
122
- g.lineStyle( 0, color, 1,
123
- true, LineScaleMode.NONE, CapsStyle.NONE, JointStyle.BEVEL );
124
- g.moveTo( start > 3 ? 2 : 0 , 2 );
125
- g.lineTo( left, 2 );
126
-
127
- // 終了円
128
- if ( d.fix_date && trade.left + end <= trade.right -3 ) {
129
- img = getTradeBitmap( d );
130
- img.x = start > 0 ? w-4 : end-3;
131
- img.y = 0;
132
- sprite.addChild(img);
107
+
108
+ // 開始と終了が同じ位置にある場合は、線と終了点は描画しない。
109
+ if ( w-4 > 0 ) {
110
+ //
111
+ var abs:Number = Math.abs( d.profit_or_loss);
112
+ var left:int = NaN;
113
+ if ( d.fix_date && (end+trade.left < trade.right) ) {
114
+ // 表示範囲内で決済済み
115
+ if ( start > 0) {
116
+ left = w-4;
117
+ } else {
118
+ left = end;
119
+ }
120
+ } else {
121
+ if ( start > 0) {
122
+ left = trade.width - start;
123
+ } else {
124
+ left = trade.width-1;
125
+ }
126
+ }
127
+ g.lineStyle( 0, color, 1,
128
+ true, LineScaleMode.NONE, CapsStyle.NONE, JointStyle.BEVEL );
129
+ g.moveTo( start > 3 ? 4 : 0 , 2 );
130
+ g.lineTo( left, 2 );
131
+
132
+ // 終了円
133
+ // 約定済みで表示金以内に値がある場合描画
134
+ if ( d.fix_date && trade.left + end <= trade.right -3 ) {
135
+ img = getTradeBitmap( d );
136
+ img.x = start > 0 ? w-4 : end-3;
137
+ img.y = 0;
138
+ sprite.addChild(img);
139
+ }
133
140
  }
134
141
 
135
142
  // あたり判定を行うためのスプライト
@@ -143,14 +150,17 @@ package fx.chart.ui {
143
150
  overSpace.visible = false;
144
151
  sprite.hitArea = overSpace;
145
152
 
153
+ sprite.alpha = 0.65
146
154
  sprite.x = start > 0 ? start+trade.left-2 : trade.left + 1;
147
155
  sprite.y = y ;
148
156
  sprite.addEventListener(MouseEvent.MOUSE_OVER, function(ev:flash.events.MouseEvent):void {
157
+ sprite.alpha = 1;
149
158
  rc.layers.setWindowVisible({"trade":true});
150
159
  detailWindow.update( d, ev );
151
160
  });
152
161
  sprite.addEventListener(MouseEvent.MOUSE_OUT, function(ev:flash.events.MouseEvent):void {
153
- rc.layers.setWindowVisible({"info":true});
162
+ sprite.alpha = 0.65;
163
+ rc.layers.setWindowVisible({"info":true});
154
164
  });
155
165
  trades.addChild( overSpace );
156
166
  trades.addChild( sprite );
@@ -30,10 +30,10 @@ package fx.util {
30
30
  public function removeEventListener( type:String,
31
31
  listener:Function ):void {
32
32
  var list:Array = listeners[type];
33
- if ( !list ) {
33
+ if ( list ) {
34
34
  var tmp:Array = [];
35
35
  list.forEach( function(item:*,i:int,arr:Array):void {
36
- if ( item.listener != listener ) tmp.add( item );
36
+ if ( item.listener != listener ) tmp.push( item );
37
37
  } );
38
38
  listeners[type] = tmp;
39
39
  }
@@ -79,6 +79,7 @@ package fx.util {
79
79
 
80
80
  /**
81
81
  * 日時に対するx座標(ローソクの中心となる座標)の位置を得る。
82
+ * 正規化済み(Math.floor(data.getTime()/1000/scaleTime)*scaleTime)した値を指定すること!
82
83
  */
83
84
  public function fromDate( date:Number ):int {
84
85
  return 6 * (( date - start ) / scale) + 6 ;
@@ -0,0 +1,8 @@
1
+ 130.79212,130.226926666667,1238508259,1238457600,1238544000,1238544000
2
+ 130.618670422535,130.753678247261,1238587900,1238544000,1238630400,1238630400
3
+ 132.395041314554,131.810198748044,1238674317,1238630400,1238716800,1238716800
4
+ 134.253391549296,134.093733020344,1238760694,1238716800,1238803200,1238803200
5
+ 135.239958685446,135.15807887324,1238847145,1238803200,1238889600,1238889600
6
+ 135.255275650118,135.245091883373,1238933342,1238889600,1238976000,1238976000
7
+ 136.043637558685,136.063615023474,1239019563,1238976000,1239062400,1239062400
8
+ 133.749184976526,134.07923286385,1239106207,1239062400,1239148800,1239148800
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1,10 @@
1
+ 131.199585964912,131.634523976608,1239748334,1239667200,1239753600,1239753600
2
+ 129.814922666667,130.141407288889,1239975565,1239926400,1240012800,1240012800
3
+ 129.305466666667,129.301822222222,1240182926,1240099200,1240185600,1240185600
4
+ 127.310548538012,127.081174658869,1240324126,1240272000,1240358400,1240358400
5
+ 127.208675177305,127.250748305753,1240401989,1240358400,1240444800,1240444800
6
+ 127.866422535211,127.708670735524,1240488836,1240444800,1240531200,1240531200
7
+ 128.351716666667,128.483905555555,1240788648,1240704000,1240790400,1240790400
8
+ 126.980044131455,127.378925195618,1240834222,1240790400,1240876800,1240876800
9
+ 125.656169953052,125.605473239437,1240920649,1240876800,1240963200,1240963200
10
+ 128.206601877934,127.7292885759,1241007163,1240963200,1241049600,1241049600
@@ -0,0 +1,20 @@
1
+ 130.13546855792,129.906030260047,1241093457,1241049600,1241136000,1241136000
2
+ 131.555655913979,131.518551971326,1241386585,1241308800,1241395200,1241395200
3
+ 132.257515151515,132.098614141414,1241439257,1241395200,1241481600,1241481600
4
+ 132.202249765258,132.299057589984,1241525524,1241481600,1241568000,1241568000
5
+ 131.033644444444,131.190948148148,1241654392,1241568000,1241654400,1241654400
6
+ 131.907007511737,131.639021596244,1241698209,1241654400,1241740800,1241740800
7
+ 132.409109333333,132.637671111111,1242079177,1242000000,1242086400,1242086400
8
+ 132.219131934732,132.391128826729,1242130120,1242086400,1242172800,1242172800
9
+ 131.047654079254,131.30735975136,1242216749,1242172800,1242259200,1242259200
10
+ 129.840769014085,129.768517057903,1242303034,1242259200,1242345600,1242345600
11
+ 128.414306432748,128.431435477582,1242588196,1242518400,1242604800,1242604800
12
+ 128.836807459207,128.520976534576,1242648713,1242604800,1242691200,1242691200
13
+ 130.879936150235,130.751193114241,1242735113,1242691200,1242777600,1242777600
14
+ 130.726760839161,130.742072105672,1242821511,1242777600,1242864000,1242864000
15
+ 130.593313615023,130.575112050078,1242907871,1242864000,1242950400,1242950400
16
+ 132.661453333333,132.653817777778,1243204102,1243123200,1243209600,1243209600
17
+ 132.806517482518,132.769880652681,1243253470,1243209600,1243296000,1243296000
18
+ 132.399311737089,132.424276369327,1243339823,1243296000,1243382400,1243382400
19
+ 132.769143661972,132.84660657277,1243426252,1243382400,1243468800,1243468800
20
+ 133.996568764569,133.518923076923,1243512644,1243468800,1243555200,1243555200
@@ -0,0 +1,20 @@
1
+ 134.872060952381,134.890686984127,1243804597,1243728000,1243814400,1243814400
2
+ 135.388398108747,135.05659322301,1243858570,1243814400,1243900800,1243900800
3
+ 136.499390338164,136.482007085346,1243944470,1243900800,1243987200,1243987200
4
+ 136.371112380952,136.576380952381,1244031300,1243987200,1244073600,1244073600
5
+ 136.61375035461,136.389513002364,1244117678,1244073600,1244160000,1244160000
6
+ 137.77248034188,137.777493447293,1244396486,1244332800,1244419200,1244419200
7
+ 137.04155399061,137.210252895149,1244463161,1244419200,1244505600,1244505600
8
+ 137.537623931624,137.471281291548,1244643080,1244592000,1244678400,1244678400
9
+ 137.482326340326,137.403383682984,1244722268,1244678400,1244764800,1244764800
10
+ 137.820253333333,137.866751111111,1245021281,1244937600,1245024000,1245024000
11
+ 136.182995804196,136.692566899767,1245067685,1245024000,1245110400,1245110400
12
+ 133.927239160839,134.162134265734,1245154279,1245110400,1245196800,1245196800
13
+ 133.443724009324,133.50922952603,1245240796,1245196800,1245283200,1245283200
14
+ 133.887648826291,133.695032237872,1245327056,1245283200,1245369600,1245369600
15
+ 134.1951625,134.205054166666,1245619425,1245542400,1245628800,1245628800
16
+ 133.193172027972,133.412037917638,1245672585,1245628800,1245715200,1245715200
17
+ 133.01662629108,132.834886697966,1245759193,1245715200,1245801600,1245801600
18
+ 133.997961502347,134.094217214398,1245845400,1245801600,1245888000,1245888000
19
+ 134.12926993007,134.013208391608,1245931730,1245888000,1245974400,1245974400
20
+ 134.630841666667,134.227459444444,1246296671,1246233600,1246320000,1246320000
@@ -0,0 +1,18 @@
1
+ 135.254635680751,135.232728012519,1246363892,1246320000,1246406400,1246406400
2
+ 136.155040559441,135.902387878788,1246450019,1246406400,1246492800,1246492800
3
+ 135.589355868545,135.995454147105,1246536200,1246492800,1246579200,1246579200
4
+ 132.933887769784,133.183422861711,1246883333,1246838400,1246924800,1246924800
5
+ 132.861871394799,132.951388494878,1246968254,1246924800,1247011200,1247011200
6
+ 130.461072261072,131.077927894328,1247054987,1247011200,1247097600,1247097600
7
+ 129.857581351981,129.581558663559,1247141604,1247097600,1247184000,1247184000
8
+ 128.949365333333,128.943121777777,1247436117,1247356800,1247443200,1247443200
9
+ 129.101785547786,128.982438228438,1247486940,1247443200,1247529600,1247529600
10
+ 130.140593006993,130.047202797203,1247573476,1247529600,1247616000,1247616000
11
+ 131.722926806527,131.247610878011,1247660056,1247616000,1247702400,1247702400
12
+ 132.358502347418,132.440816588419,1247746257,1247702400,1247788800,1247788800
13
+ 132.882796666667,132.867598888889,1248036431,1247961600,1248048000,1248048000
14
+ 134.089330516432,133.86922629108,1248091467,1248048000,1248134400,1248134400
15
+ 133.476744988345,133.66665982906,1248178078,1248134400,1248220800,1248220800
16
+ 132.886275058275,132.881843978244,1248264539,1248220800,1248307200,1248307200
17
+ 134.310020512821,133.984297125097,1248351049,1248307200,1248393600,1248393600
18
+ 134.72,134.72,1248562033,1248480000,1248566400,1248566400
@@ -0,0 +1,8 @@
1
+ 130.79212,130.226926666667,1238508259,1238457600,1238544000,1238544000
2
+ 130.618670422535,130.753678247261,1238587900,1238544000,1238630400,1238630400
3
+ 132.395041314554,131.810198748044,1238674317,1238630400,1238716800,1238716800
4
+ 134.253391549296,134.093733020344,1238760694,1238716800,1238803200,1238803200
5
+ 135.239958685446,135.15807887324,1238847145,1238803200,1238889600,1238889600
6
+ 135.255275650118,135.245091883373,1238933342,1238889600,1238976000,1238976000
7
+ 136.043637558685,136.063615023474,1239019563,1238976000,1239062400,1239062400
8
+ 133.749184976526,134.07923286385,1239106207,1239062400,1239148800,1239148800
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1,10 @@
1
+ 131.199585964912,131.634523976608,1239748334,1239667200,1239753600,1239753600
2
+ 129.814922666667,130.141407288889,1239975565,1239926400,1240012800,1240012800
3
+ 129.305466666667,129.301822222222,1240182926,1240099200,1240185600,1240185600
4
+ 127.310548538012,127.081174658869,1240324126,1240272000,1240358400,1240358400
5
+ 127.208675177305,127.250748305753,1240401989,1240358400,1240444800,1240444800
6
+ 127.866422535211,127.708670735524,1240488836,1240444800,1240531200,1240531200
7
+ 128.351716666667,128.483905555555,1240788648,1240704000,1240790400,1240790400
8
+ 126.980044131455,127.378925195618,1240834222,1240790400,1240876800,1240876800
9
+ 125.656169953052,125.605473239437,1240920649,1240876800,1240963200,1240963200
10
+ 128.206601877934,127.7292885759,1241007163,1240963200,1241049600,1241049600
@@ -0,0 +1,20 @@
1
+ 130.13546855792,129.906030260047,1241093457,1241049600,1241136000,1241136000
2
+ 131.555655913979,131.518551971326,1241386585,1241308800,1241395200,1241395200
3
+ 132.257515151515,132.098614141414,1241439257,1241395200,1241481600,1241481600
4
+ 132.202249765258,132.299057589984,1241525524,1241481600,1241568000,1241568000
5
+ 131.033644444444,131.190948148148,1241654392,1241568000,1241654400,1241654400
6
+ 131.907007511737,131.639021596244,1241698209,1241654400,1241740800,1241740800
7
+ 132.409109333333,132.637671111111,1242079177,1242000000,1242086400,1242086400
8
+ 132.219131934732,132.391128826729,1242130120,1242086400,1242172800,1242172800
9
+ 131.047654079254,131.30735975136,1242216749,1242172800,1242259200,1242259200
10
+ 129.840769014085,129.768517057903,1242303034,1242259200,1242345600,1242345600
11
+ 128.414306432748,128.431435477582,1242588196,1242518400,1242604800,1242604800
12
+ 128.836807459207,128.520976534576,1242648713,1242604800,1242691200,1242691200
13
+ 130.879936150235,130.751193114241,1242735113,1242691200,1242777600,1242777600
14
+ 130.726760839161,130.742072105672,1242821511,1242777600,1242864000,1242864000
15
+ 130.593313615023,130.575112050078,1242907871,1242864000,1242950400,1242950400
16
+ 132.661453333333,132.653817777778,1243204102,1243123200,1243209600,1243209600
17
+ 132.806517482518,132.769880652681,1243253470,1243209600,1243296000,1243296000
18
+ 132.399311737089,132.424276369327,1243339823,1243296000,1243382400,1243382400
19
+ 132.769143661972,132.84660657277,1243426252,1243382400,1243468800,1243468800
20
+ 133.996568764569,133.518923076923,1243512644,1243468800,1243555200,1243555200
@@ -0,0 +1,20 @@
1
+ 134.872060952381,134.890686984127,1243804597,1243728000,1243814400,1243814400
2
+ 135.388398108747,135.05659322301,1243858570,1243814400,1243900800,1243900800
3
+ 136.499390338164,136.482007085346,1243944470,1243900800,1243987200,1243987200
4
+ 136.371112380952,136.576380952381,1244031300,1243987200,1244073600,1244073600
5
+ 136.61375035461,136.389513002364,1244117678,1244073600,1244160000,1244160000
6
+ 137.77248034188,137.777493447293,1244396486,1244332800,1244419200,1244419200
7
+ 137.04155399061,137.210252895149,1244463161,1244419200,1244505600,1244505600
8
+ 137.537623931624,137.471281291548,1244643080,1244592000,1244678400,1244678400
9
+ 137.482326340326,137.403383682984,1244722268,1244678400,1244764800,1244764800
10
+ 137.820253333333,137.866751111111,1245021281,1244937600,1245024000,1245024000
11
+ 136.182995804196,136.692566899767,1245067685,1245024000,1245110400,1245110400
12
+ 133.927239160839,134.162134265734,1245154279,1245110400,1245196800,1245196800
13
+ 133.443724009324,133.50922952603,1245240796,1245196800,1245283200,1245283200
14
+ 133.887648826291,133.695032237872,1245327056,1245283200,1245369600,1245369600
15
+ 134.1951625,134.205054166666,1245619425,1245542400,1245628800,1245628800
16
+ 133.193172027972,133.412037917638,1245672585,1245628800,1245715200,1245715200
17
+ 133.01662629108,132.834886697966,1245759193,1245715200,1245801600,1245801600
18
+ 133.997961502347,134.094217214398,1245845400,1245801600,1245888000,1245888000
19
+ 134.12926993007,134.013208391608,1245931730,1245888000,1245974400,1245974400
20
+ 134.630841666667,134.227459444444,1246296671,1246233600,1246320000,1246320000
@@ -0,0 +1,18 @@
1
+ 135.254635680751,135.232728012519,1246363892,1246320000,1246406400,1246406400
2
+ 136.155040559441,135.902387878788,1246450019,1246406400,1246492800,1246492800
3
+ 135.589355868545,135.995454147105,1246536200,1246492800,1246579200,1246579200
4
+ 132.933887769784,133.183422861711,1246883333,1246838400,1246924800,1246924800
5
+ 132.861871394799,132.951388494878,1246968254,1246924800,1247011200,1247011200
6
+ 130.461072261072,131.077927894328,1247054987,1247011200,1247097600,1247097600
7
+ 129.857581351981,129.581558663559,1247141604,1247097600,1247184000,1247184000
8
+ 128.949365333333,128.943121777777,1247436117,1247356800,1247443200,1247443200
9
+ 129.101785547786,128.982438228438,1247486940,1247443200,1247529600,1247529600
10
+ 130.140593006993,130.047202797203,1247573476,1247529600,1247616000,1247616000
11
+ 131.722926806527,131.247610878011,1247660056,1247616000,1247702400,1247702400
12
+ 132.358502347418,132.440816588419,1247746257,1247702400,1247788800,1247788800
13
+ 132.882796666667,132.867598888889,1248036431,1247961600,1248048000,1248048000
14
+ 134.089330516432,133.86922629108,1248091467,1248048000,1248134400,1248134400
15
+ 133.476744988345,133.66665982906,1248178078,1248134400,1248220800,1248220800
16
+ 132.886275058275,132.881843978244,1248264539,1248220800,1248307200,1248307200
17
+ 134.310020512821,133.984297125097,1248351049,1248307200,1248393600,1248393600
18
+ 134.72,134.72,1248562033,1248480000,1248566400,1248566400
@@ -0,0 +1,8 @@
1
+ 130.79212,130.226926666667,1238508259,1238457600,1238544000,1238544000
2
+ 130.618670422535,130.753678247261,1238587900,1238544000,1238630400,1238630400
3
+ 132.395041314554,131.810198748044,1238674317,1238630400,1238716800,1238716800
4
+ 134.253391549296,134.093733020344,1238760694,1238716800,1238803200,1238803200
5
+ 135.239958685446,135.15807887324,1238847145,1238803200,1238889600,1238889600
6
+ 135.255275650118,135.245091883373,1238933342,1238889600,1238976000,1238976000
7
+ 136.043637558685,136.063615023474,1239019563,1238976000,1239062400,1239062400
8
+ 133.749184976526,134.07923286385,1239106207,1239062400,1239148800,1239148800
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1 @@
1
+ 134.164674074074,134.754755555556,1246574106,1246492800,1246579200,1246579200
@@ -0,0 +1,10 @@
1
+ 131.199585964912,131.634523976608,1239748334,1239667200,1239753600,1239753600
2
+ 129.814922666667,130.141407288889,1239975565,1239926400,1240012800,1240012800
3
+ 129.305466666667,129.301822222222,1240182926,1240099200,1240185600,1240185600
4
+ 127.310548538012,127.081174658869,1240324126,1240272000,1240358400,1240358400
5
+ 127.208675177305,127.250748305753,1240401989,1240358400,1240444800,1240444800
6
+ 127.866422535211,127.708670735524,1240488836,1240444800,1240531200,1240531200
7
+ 128.351716666667,128.483905555555,1240788648,1240704000,1240790400,1240790400
8
+ 126.980044131455,127.378925195618,1240834222,1240790400,1240876800,1240876800
9
+ 125.656169953052,125.605473239437,1240920649,1240876800,1240963200,1240963200
10
+ 128.206601877934,127.7292885759,1241007163,1240963200,1241049600,1241049600
@@ -0,0 +1,20 @@
1
+ 130.13546855792,129.906030260047,1241093457,1241049600,1241136000,1241136000
2
+ 131.555655913979,131.518551971326,1241386585,1241308800,1241395200,1241395200
3
+ 132.257515151515,132.098614141414,1241439257,1241395200,1241481600,1241481600
4
+ 132.202249765258,132.299057589984,1241525524,1241481600,1241568000,1241568000
5
+ 131.033644444444,131.190948148148,1241654392,1241568000,1241654400,1241654400
6
+ 131.907007511737,131.639021596244,1241698209,1241654400,1241740800,1241740800
7
+ 132.409109333333,132.637671111111,1242079177,1242000000,1242086400,1242086400
8
+ 132.219131934732,132.391128826729,1242130120,1242086400,1242172800,1242172800
9
+ 131.047654079254,131.30735975136,1242216749,1242172800,1242259200,1242259200
10
+ 129.840769014085,129.768517057903,1242303034,1242259200,1242345600,1242345600
11
+ 128.414306432748,128.431435477582,1242588196,1242518400,1242604800,1242604800
12
+ 128.836807459207,128.520976534576,1242648713,1242604800,1242691200,1242691200
13
+ 130.879936150235,130.751193114241,1242735113,1242691200,1242777600,1242777600
14
+ 130.726760839161,130.742072105672,1242821511,1242777600,1242864000,1242864000
15
+ 130.593313615023,130.575112050078,1242907871,1242864000,1242950400,1242950400
16
+ 132.661453333333,132.653817777778,1243204102,1243123200,1243209600,1243209600
17
+ 132.806517482518,132.769880652681,1243253470,1243209600,1243296000,1243296000
18
+ 132.399311737089,132.424276369327,1243339823,1243296000,1243382400,1243382400
19
+ 132.769143661972,132.84660657277,1243426252,1243382400,1243468800,1243468800
20
+ 133.996568764569,133.518923076923,1243512644,1243468800,1243555200,1243555200
@@ -0,0 +1,20 @@
1
+ 134.872060952381,134.890686984127,1243804597,1243728000,1243814400,1243814400
2
+ 135.388398108747,135.05659322301,1243858570,1243814400,1243900800,1243900800
3
+ 136.499390338164,136.482007085346,1243944470,1243900800,1243987200,1243987200
4
+ 136.371112380952,136.576380952381,1244031300,1243987200,1244073600,1244073600
5
+ 136.61375035461,136.389513002364,1244117678,1244073600,1244160000,1244160000
6
+ 137.77248034188,137.777493447293,1244396486,1244332800,1244419200,1244419200
7
+ 137.04155399061,137.210252895149,1244463161,1244419200,1244505600,1244505600
8
+ 137.537623931624,137.471281291548,1244643080,1244592000,1244678400,1244678400
9
+ 137.482326340326,137.403383682984,1244722268,1244678400,1244764800,1244764800
10
+ 137.820253333333,137.866751111111,1245021281,1244937600,1245024000,1245024000
11
+ 136.182995804196,136.692566899767,1245067685,1245024000,1245110400,1245110400
12
+ 133.927239160839,134.162134265734,1245154279,1245110400,1245196800,1245196800
13
+ 133.443724009324,133.50922952603,1245240796,1245196800,1245283200,1245283200
14
+ 133.887648826291,133.695032237872,1245327056,1245283200,1245369600,1245369600
15
+ 134.1951625,134.205054166666,1245619425,1245542400,1245628800,1245628800
16
+ 133.193172027972,133.412037917638,1245672585,1245628800,1245715200,1245715200
17
+ 133.01662629108,132.834886697966,1245759193,1245715200,1245801600,1245801600
18
+ 133.997961502347,134.094217214398,1245845400,1245801600,1245888000,1245888000
19
+ 134.12926993007,134.013208391608,1245931730,1245888000,1245974400,1245974400
20
+ 134.630841666667,134.227459444444,1246296671,1246233600,1246320000,1246320000
@@ -0,0 +1,18 @@
1
+ 135.254635680751,135.232728012519,1246363892,1246320000,1246406400,1246406400
2
+ 136.155040559441,135.902387878788,1246450019,1246406400,1246492800,1246492800
3
+ 135.589355868545,135.995454147105,1246536200,1246492800,1246579200,1246579200
4
+ 132.933887769784,133.183422861711,1246883333,1246838400,1246924800,1246924800
5
+ 132.861871394799,132.951388494878,1246968254,1246924800,1247011200,1247011200
6
+ 130.461072261072,131.077927894328,1247054987,1247011200,1247097600,1247097600
7
+ 129.857581351981,129.581558663559,1247141604,1247097600,1247184000,1247184000
8
+ 128.949365333333,128.943121777777,1247436117,1247356800,1247443200,1247443200
9
+ 129.101785547786,128.982438228438,1247486940,1247443200,1247529600,1247529600
10
+ 130.140593006993,130.047202797203,1247573476,1247529600,1247616000,1247616000
11
+ 131.722926806527,131.247610878011,1247660056,1247616000,1247702400,1247702400
12
+ 132.358502347418,132.440816588419,1247746257,1247702400,1247788800,1247788800
13
+ 132.882796666667,132.867598888889,1248036431,1247961600,1248048000,1248048000
14
+ 134.089330516432,133.86922629108,1248091467,1248048000,1248134400,1248134400
15
+ 133.476744988345,133.66665982906,1248178078,1248134400,1248220800,1248220800
16
+ 132.886275058275,132.881843978244,1248264539,1248220800,1248307200,1248307200
17
+ 134.310020512821,133.984297125097,1248351049,1248307200,1248393600,1248393600
18
+ 134.72,134.72,1248562033,1248480000,1248566400,1248566400
@@ -0,0 +1,6 @@
1
+
2
+ module JIJIPluginTest
3
+ def self.aaa
4
+ "aaa"
5
+ end
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unageanu-jiji
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaya Yamauchi
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 2.1.5
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: rubyzip
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.1
34
+ version:
25
35
  - !ruby/object:Gem::Dependency
26
36
  name: unageanu-clickclient_scrap
27
37
  type: :runtime
@@ -163,6 +173,8 @@ files:
163
173
  - html/img/folder_brick.png
164
174
  - html/img/folder_user.png
165
175
  - html/img/foot.jpg
176
+ - html/img/goto.gif
177
+ - html/img/goto_o.gif
166
178
  - html/img/h3_bt-create_0.gif
167
179
  - html/img/h3_bt-create_1.gif
168
180
  - html/img/h3_bt-create_2.gif
@@ -481,6 +493,7 @@ files:
481
493
  - lib/jiji/service/rate_service.rb
482
494
  - lib/jiji/service/system_service.rb
483
495
  - lib/jiji/service/trade_result_service.rb
496
+ - lib/jiji/util/backtester.rb
484
497
  - lib/jiji/util/block_to_session.rb
485
498
  - lib/jiji/util/cache.rb
486
499
  - lib/jiji/util/csv_append_support.rb
@@ -654,20 +667,41 @@ files:
654
667
  - test/migration/migrator1_0_3test_data/rmt/out/NjM5YWFhZmQtNDFjNy00NjUxLWIwYmItNTc3ZjAyZTg5ODA5/56e75Yuasdwqdd/meta.yaml
655
668
  - test/migration/migrator1_0_3test_data/rmt/out/NjM5YWFhZmQtNDFjNy00NjUxLWIwYmItNTc3ZjAyZTg5ODA5/56e75YuV5bmz5Z2H57ea/meta.yaml
656
669
  - test/migration/migrator1_1_0test_data/configuration.yaml
670
+ - test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
657
671
  - test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
672
+ - test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
658
673
  - test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
674
+ - test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
659
675
  - test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
676
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
677
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
678
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
679
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
660
680
  - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
661
681
  - test/migration/migrator1_2_0test_data/basic/props.yaml
682
+ - test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
662
683
  - test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
684
+ - test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
663
685
  - test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
686
+ - test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
664
687
  - test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
688
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
689
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
690
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
691
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
665
692
  - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
666
693
  - test/migration/migrator1_2_0test_data/illegal_props/props.yaml
667
694
  - test/migration/migrator1_2_0test_data/no_outs/props.yaml
695
+ - test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
668
696
  - test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
697
+ - test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
669
698
  - test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
699
+ - test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
670
700
  - test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
701
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
702
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
703
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
704
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
671
705
  - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
672
706
  - test/migration/test_Migrator.rb
673
707
  - test/migration/test_Migrator1_0_3.rb
@@ -682,6 +716,7 @@ files:
682
716
  - test/plugin/test_gem/a/jiji_plugin_test_gem_a-1.0.0.gem
683
717
  - test/plugin/test_gem/a/jiji_plugin_test_gem_a.gemspec
684
718
  - test/plugin/test_gem/a/lib/jiji_plugin.rb
719
+ - test/plugin/test_gem/a/lib/jiji_plugin_test.rb
685
720
  - test/plugin/test_gem/b/jiji_plugin_test_gem_b-1.0.0.gem
686
721
  - test/plugin/test_gem/b/jiji_plugin_test_gem_b.gemspec
687
722
  - test/plugin/test_gem/b/lib/jiji_plugin.rb
@@ -810,20 +845,41 @@ test_files:
810
845
  - test/migration/migrator1_0_3test_data/rmt/out/NjM5YWFhZmQtNDFjNy00NjUxLWIwYmItNTc3ZjAyZTg5ODA5/56e75Yuasdwqdd/meta.yaml
811
846
  - test/migration/migrator1_0_3test_data/rmt/out/NjM5YWFhZmQtNDFjNy00NjUxLWIwYmItNTc3ZjAyZTg5ODA5/56e75YuV5bmz5Z2H57ea/meta.yaml
812
847
  - test/migration/migrator1_1_0test_data/configuration.yaml
848
+ - test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
813
849
  - test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
850
+ - test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
814
851
  - test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
852
+ - test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
815
853
  - test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
854
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
855
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
856
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
857
+ - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
816
858
  - test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
817
859
  - test/migration/migrator1_2_0test_data/basic/props.yaml
860
+ - test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
818
861
  - test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
862
+ - test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
819
863
  - test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
864
+ - test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
820
865
  - test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
866
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
867
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
868
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
869
+ - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
821
870
  - test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
822
871
  - test/migration/migrator1_2_0test_data/illegal_props/props.yaml
823
872
  - test/migration/migrator1_2_0test_data/no_outs/props.yaml
873
+ - test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
824
874
  - test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml
875
+ - test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
825
876
  - test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml
877
+ - test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
826
878
  - test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml
879
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-04.csv
880
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-05.csv
881
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-06.csv
882
+ - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/1d/2009-07.csv
827
883
  - test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml
828
884
  - test/migration/test_Migrator.rb
829
885
  - test/migration/test_Migrator1_0_3.rb
@@ -838,6 +894,7 @@ test_files:
838
894
  - test/plugin/test_gem/a/jiji_plugin_test_gem_a-1.0.0.gem
839
895
  - test/plugin/test_gem/a/jiji_plugin_test_gem_a.gemspec
840
896
  - test/plugin/test_gem/a/lib/jiji_plugin.rb
897
+ - test/plugin/test_gem/a/lib/jiji_plugin_test.rb
841
898
  - test/plugin/test_gem/b/jiji_plugin_test_gem_b-1.0.0.gem
842
899
  - test/plugin/test_gem/b/jiji_plugin_test_gem_b.gemspec
843
900
  - test/plugin/test_gem/b/lib/jiji_plugin.rb