Skip to content

Method does not exist (markOHLC) #112

Description

@a177177

Assuming GdaxScalperCommand.php needs a tweak but not sure where/how.

Tried this:

`$ php artisan bowhead:gdax_scalper`

Resulted in:

------------------------------------------------------------------
Set CBURL to api-public.sandbox.gdax.com before running this..
This will trade live otherwise, so be CAREFUL
PRESS ENTER TO CONTINUE
------------------------------------------------------------------

UPDATING RECENT Open, High, Low, Close data

In Macroable.php line 99:
                                                                               
  Method Bowhead\Console\Commands\GdaxScalperCommand::markOHLC does not exist  

Relevant portion of GdaxScalperCommand.php:

        echo $this->console->colorize("UPDATING RECENT Open, High, Low, Close data\n");
        $_trades = $this->coinbase->get_endpoint('trades',null,null,'ETH-USD');
        $totalsize = $trades = [];
        $total = count($_trades);
        $i = 1;
        foreach($_trades as $tr) {
            $dates = date_parse($tr['time']);
            $timeid = $dates['year'].str_pad($dates['month'],2,0,STR_PAD_LEFT).str_pad($dates['day'],2,0,STR_PAD_LEFT).str_pad($dates['hour'],2,0,STR_PAD_LEFT).str_pad($dates['minute'],2,0,STR_PAD_LEFT);

            $totalsize[$timeid] = $totalsize[$timeid] ?? 0; // init if not present
            $totalsize[$timeid] += $tr['size'] ?? 0;        // otherwise increment
            $ticker = [];
            $ticker['timeid'] = $timeid;
            $ticker[7] = $tr['price'];
            $ticker[8] = $totalsize[$timeid] ?? 0;
            $this->markOHLC($ticker, 1, $this->instrument);
            $this->console->progressBar($i, $total);
            $i++;
        }

I'm new to coding so it's possible I'm missing something stupidly obvious here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions