Skip to content

Commit

Permalink
Fixed the sell price calculation for the futures strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Aug 22, 2024
1 parent f8ae511 commit ccab10b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/Deals/Strategy/FutureStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getBuyPrice(): string
public function getSellPrice(): string
{
if ($this->deal['deal']->getSellPrice() > $this->deal['futureLotSize']) {
return bcmul($this->deal['deal']->getSellPrice(), $this->deal['futureLotSize'], 4);
return bcmul($this->deal['deal']->getSellPrice(), $this->deal['futureStepPrice'], 4);
}
return bcmul(bcmul($this->deal['deal']->getSellPrice(), $this->deal['futureStepPrice'], 4), $this->deal['futureLotSize'], 4);
}
Expand Down

0 comments on commit ccab10b

Please sign in to comment.