/ Published in: TCL
URL: candle
candle
Expand |
Embed | Plain Text
set nrows [m rows] for {set i 0} {$i<$nrows} {incr i} { set row [m get row $i] set date [lindex $row 0] set x [lindex $row 1] set open [lindex $row 2] set high [lindex $row 3] set low [lindex $row 4] set close [lindex $row 5] set volumn [lindex $row 6] .c.right.report.tree insert {} end -values [list $date $x $open $high $low $close $volumn] } set res {} set x {} set open {} set close {} set high {} set low {} for {set i 0} {$i<100} {incr i} { set row [m get row $i] lappend open [lindex $row 2] lappend high [lindex $row 3] lappend low [lindex $row 4] lappend close [lindex $row 5] lappend x $open } #set sorted [lsort -real $res] #set max [lindex $sorted end] #set min [lindex $sorted 0] #puts $max #puts $min #set yaxis {} #lappend yaxis $min #lappend yaxis $max #lappend yaxis 5.0 #set s [::Plotchart::createXYPlot .c.left.graph_canvas.canvas {0.0 100.0 10.0} $yaxis] #foreach {x y} {0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 } { #$s plot series1 $x $y #} #$s title "Data series" #for {set i 0} {$i<100} {incr i} { #$s plot series1 $i [lindex $res $i] #} set data {} for {set i 0} {$i<10} {incr i} { lappend data $i } set s [::Plotchart::createBoxplot2 .c.left.graph_canvas.canvas {357 359 1} $data ] for {set i 0} {$i<10} {incr i} { set x_i [lindex $x $i] set open_i [lindex $open $i] set close_i [lindex $close $i] set low_i [lindex $low $i] set high_i [lindex $high $i] set candle {} lappend candle [expr { double($open_i)}] lappend candle [expr {double($open_i)}] lappend candle [expr {double($close_i)}] lappend candle [expr {double($low_i)}] lappend candle [expr {double($high_i)}] $s plot [lindex $data $i] $candle }
You need to login to post a comment.
