237 lines
7.1 KiB
C
237 lines
7.1 KiB
C
#
|
|
# G N U P L O T
|
|
# Version 5.4 patchlevel 8 last modified 2023-06-01
|
|
#
|
|
# Copyright (C) 1986-1993, 1998, 2004, 2007-2023
|
|
# Thomas Williams, Colin Kelley and many others
|
|
#
|
|
# gnuplot home: http://www.gnuplot.info
|
|
# faq, bugs, etc: type "help FAQ"
|
|
# immediate help: type "help" (plot window: hit 'h')
|
|
# set terminal windows 0 color solid butt enhanced standalone wsize 1440,792
|
|
# set output
|
|
unset clip points
|
|
set clip one
|
|
unset clip two
|
|
unset clip radial
|
|
set errorbars front 1.000000
|
|
set border 31 front lt black linewidth 1.000 dashtype solid
|
|
set zdata
|
|
set ydata
|
|
set xdata
|
|
set y2data
|
|
set x2data
|
|
set boxwidth
|
|
set boxdepth 0
|
|
set style fill empty border
|
|
set style rectangle back fc bgnd fillstyle solid 1.00 border lt -1
|
|
set style circle radius graph 0.02
|
|
set style ellipse size graph 0.05, 0.03 angle 0 units xy
|
|
set dummy x, y
|
|
set format x "% h"
|
|
set format y "% h"
|
|
set format x2 "% h"
|
|
set format y2 "% h"
|
|
set format z "% h"
|
|
set format cb "% h"
|
|
set format r "% h"
|
|
set ttics format "% h"
|
|
set timefmt "%d/%m/%y,%H:%M"
|
|
set angles radians
|
|
set tics back
|
|
unset grid
|
|
unset raxis
|
|
set theta counterclockwise right
|
|
set style parallel front lt black linewidth 2.000 dashtype solid
|
|
set key notitle
|
|
set key fixed left top vertical Right noreverse enhanced autotitle nobox
|
|
set key noinvert samplen 4 spacing 1 width 0 height 0
|
|
set key maxcolumns 0 maxrows 0
|
|
set key noopaque
|
|
unset label
|
|
unset arrow
|
|
unset style line
|
|
unset style arrow
|
|
set style histogram clustered gap 2 title textcolor lt -1
|
|
unset object
|
|
unset walls
|
|
set style textbox transparent margins 1.0, 1.0 border lt -1 linewidth 1.0
|
|
set offsets 0, 0, 0, 0
|
|
set pointsize 1
|
|
set pointintervalbox 1
|
|
set encoding cp1252
|
|
unset polar
|
|
unset parametric
|
|
unset spiderplot
|
|
unset decimalsign
|
|
unset micro
|
|
unset minussign
|
|
set view 60, 30, 1, 1
|
|
set view azimuth 0
|
|
set rgbmax 255
|
|
set samples 100, 100
|
|
set isosamples 10, 10
|
|
set surface implicit
|
|
set surface
|
|
unset contour
|
|
set cntrlabel format '%8.3g' font '' start 5 interval 20
|
|
set mapping cartesian
|
|
set datafile separator ";"
|
|
set datafile nocolumnheaders
|
|
unset hidden3d
|
|
set cntrparam order 4
|
|
set cntrparam linear
|
|
set cntrparam levels 5
|
|
set cntrparam levels auto
|
|
set cntrparam firstlinetype 0 unsorted
|
|
set cntrparam points 5
|
|
set size ratio 0 1,1
|
|
set origin 0,0
|
|
set style data points
|
|
set style function lines
|
|
unset xzeroaxis
|
|
unset yzeroaxis
|
|
unset zzeroaxis
|
|
unset x2zeroaxis
|
|
unset y2zeroaxis
|
|
set xyplane relative 0.5
|
|
set tics scale 1, 0.5, 1, 1, 1
|
|
set mxtics default
|
|
set mytics default
|
|
set mztics default
|
|
set mx2tics default
|
|
set my2tics default
|
|
set mcbtics default
|
|
set mrtics default
|
|
set nomttics
|
|
set xtics border in scale 1,0.5 mirror norotate autojustify
|
|
set xtics norangelimit autofreq
|
|
set ytics border in scale 1,0.5 mirror norotate autojustify
|
|
set ytics norangelimit autofreq
|
|
set ztics border in scale 1,0.5 nomirror norotate autojustify
|
|
set ztics norangelimit autofreq
|
|
unset x2tics
|
|
unset y2tics
|
|
set cbtics border in scale 1,0.5 mirror norotate autojustify
|
|
set cbtics norangelimit autofreq
|
|
set rtics axis in scale 1,0.5 nomirror norotate autojustify
|
|
set rtics norangelimit autofreq
|
|
unset ttics
|
|
set title ""
|
|
set title font "" textcolor lt -1 norotate
|
|
set timestamp bottom
|
|
set timestamp ""
|
|
set timestamp font "" textcolor lt -1 norotate
|
|
set trange [ * : * ] noreverse nowriteback
|
|
set urange [ * : * ] noreverse nowriteback
|
|
set vrange [ * : * ] noreverse nowriteback
|
|
set xlabel ""
|
|
set xlabel font "" textcolor lt -1 norotate
|
|
set x2label ""
|
|
set x2label font "" textcolor lt -1 norotate
|
|
set xrange [ * : * ] noreverse writeback
|
|
set x2range [ * : * ] noreverse writeback
|
|
set ylabel ""
|
|
set ylabel font "" textcolor lt -1 rotate
|
|
set y2label ""
|
|
set y2label font "" textcolor lt -1 rotate
|
|
set yrange [ * : * ] noreverse writeback
|
|
set y2range [ * : * ] noreverse writeback
|
|
set zlabel ""
|
|
set zlabel font "" textcolor lt -1 norotate
|
|
set zrange [ * : * ] noreverse writeback
|
|
set cblabel ""
|
|
set cblabel font "" textcolor lt -1 rotate
|
|
set cbrange [ * : * ] noreverse writeback
|
|
set rlabel ""
|
|
set rlabel font "" textcolor lt -1 norotate
|
|
set rrange [ * : * ] noreverse writeback
|
|
unset logscale
|
|
unset jitter
|
|
set zero 1e-08
|
|
set lmargin -1
|
|
set bmargin -1
|
|
set rmargin -1
|
|
set tmargin -1
|
|
set locale "Portuguese_Brazil.1252"
|
|
set pm3d explicit at s
|
|
set pm3d scansautomatic
|
|
set pm3d interpolate 1,1 flush begin noftriangles noborder corners2color mean
|
|
set pm3d clip z
|
|
set pm3d nolighting
|
|
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
|
|
set palette rgbformulae 7, 5, 15
|
|
set colorbox default
|
|
set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault
|
|
set style boxplot candles range 1.50 outliers pt 7 separation 1 labels auto unsorted
|
|
set loadpath
|
|
set fontpath
|
|
set psdir
|
|
set fit brief errorvariables nocovariancevariables errorscaling prescale nowrap v5
|
|
I = {0.0, 1.0}
|
|
VoxelDistance = 0.0
|
|
x = 0.0
|
|
set key top left
|
|
set xdata time
|
|
set timefmt "%Y-%m-%d %H:%M:%S"
|
|
set xtics rotate by -70 autofreq format "%H:%M"
|
|
set ytics format "%.2f%%"
|
|
set grid
|
|
fname="AccountMonitor-".strftime("%Y.%m.%d",time(0)).".csv"
|
|
#fname="AccountMonitor-".strftime("%Y.%m",time(0)).".14.csv"
|
|
#set xrange [strftime("%Y-%m-14",time(0)).' 10:00:00':]
|
|
set xrange [strftime("%Y-%m-%d",time(0)).' 10:00:00':]
|
|
|
|
set table
|
|
plot fname using 1:(voltotal=$15) w l lw 1 title invested0=columnheader(5)
|
|
unset table
|
|
|
|
set term pdfcairo
|
|
set size 1,1
|
|
set origin 0,0
|
|
set output 'AccountMonitor-'.strftime("%Y.%m.%d",time(0)).'.pdf'
|
|
#set output 'AccountMonitor-'.strftime("%Y.%m",time(0)).'.14.pdf'
|
|
|
|
taxas=0.024
|
|
capital=200000
|
|
|
|
if ((voltotal==0)&&(invested0!=0)){
|
|
plot fname using 1:17 w l lw 2 title columnheader(16),'' using 1:19 w l lw 2 title columnheader(18),'' using 1:(100*$20/invested0+$21) w l lw 2 title 'Valor de mercado'#,'' using 1:21 w l lw 2 title 'Saldo'
|
|
} else {
|
|
plot fname using 1:17 w l lw 2 title columnheader(16),'' using 1:19 w l lw 2 title columnheader(18),'' using 1:($20+$21-($9+$12)*taxas/capital) w l lw 2 title 'Valor de mercado'#,'' using 1:($21-($9+$12)*taxas/capital) w l lw 2 title 'Saldo'
|
|
}
|
|
|
|
set multiplot layout 1,2
|
|
if ((voltotal==0)&&(invested0!=0)){
|
|
plot fname using 1:(100*$20/invested0+$21) w l lt 2 lw 2 title "Valor de mercado"
|
|
} else {
|
|
plot fname using 1:($20+$21-($9+$12)*taxas/capital) w l lt 2 lw 2 title "Valor de mercado"
|
|
}
|
|
plot fname using 1:($21-($9+$12)*taxas/capital) w l lt 3 lw 2 title "Saldo"
|
|
unset multiplot
|
|
|
|
set multiplot layout 1,2
|
|
set ytics format "%.0f"
|
|
plot fname using 1:4 w l lt 6 lw 2 title "Número de posições"
|
|
set ytics format "%.2f%%"
|
|
plot fname using 1:5 w l lt 7 lw 2 title "Total investido"
|
|
unset multiplot
|
|
|
|
#set multiplot layout 1,2
|
|
#plot fname using 1:6 w l lt 8 lw 2 title "Lucro flutuante" #igual a coluna 20
|
|
#plot fname using 1:($20+$21) w l lt 1 lw 2 title "Lucro total no dia" #igual ao valor de mercado
|
|
#unset multiplot
|
|
|
|
set multiplot layout 1,2
|
|
set ytics format "%.2f%%"
|
|
plot fname using 1:14 w l lt 8 lw 2 title "Eficiência"
|
|
#set ytics format "%.0f"
|
|
plot fname using 1:15 w l lt 1 lw 2 title "Volume"
|
|
unset multiplot
|
|
|
|
set output
|
|
|
|
#7 profbuy,8 effbuy,9 volbuy,10 profitsell,11 effsell,12 volsell,
|
|
#16 Ref1 17 ref1 18 Ref2 19 ref2
|
|
#20 eqty,21 bal,22 inv
|
|
# EOF
|