File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,21 @@ func (s *Strategy) InitDrawCommands(profit, cumProfit types.Series) {
37
37
func (s * Strategy ) Draw (profit , cumProfit types.Series ) error {
38
38
39
39
canvas := DrawPNL (s .InstanceID (), profit )
40
- f , err := os .Create (s .GraphPNLPath )
40
+ fPnL , err := os .Create (s .GraphPNLPath )
41
41
if err != nil {
42
42
return fmt .Errorf ("cannot create on path " + s .GraphPNLPath )
43
43
}
44
- defer f .Close ()
45
- if err = canvas .Render (chart .PNG , f ); err != nil {
44
+ defer fPnL .Close ()
45
+ if err = canvas .Render (chart .PNG , fPnL ); err != nil {
46
46
return fmt .Errorf ("cannot render pnl" )
47
47
}
48
48
canvas = DrawCumPNL (s .InstanceID (), cumProfit )
49
- f , err = os .Create (s .GraphCumPNLPath )
49
+ fCumPnL , err : = os .Create (s .GraphCumPNLPath )
50
50
if err != nil {
51
51
return fmt .Errorf ("cannot create on path " + s .GraphCumPNLPath )
52
52
}
53
- defer f .Close ()
54
- if err = canvas .Render (chart .PNG , f ); err != nil {
53
+ defer fCumPnL .Close ()
54
+ if err = canvas .Render (chart .PNG , fCumPnL ); err != nil {
55
55
return fmt .Errorf ("cannot render cumpnl" )
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments