Compute price based on order item fields
The short answer: No

Why:

In the Drupal Commerce Slack Channel, I asked whether it would be possible to add Order Item to the Context class. This was the response:


  price resolvers are also called by regular price formatters the whole
  point of the context is to provide known information when the order
  item is missing
  
  so changing that would be a big API change if you need order item
  data, for now use an order processor instead


How to solve the issue:

Replace YOURMODULE with the name of your custom module.  The Priority value is used to prioritize what order processors get called first.  You need to look at other order processors and figure out when yours should be called and set the priority value appropriately.

In YOURMODULE.services.yml

services:
    YOURMODULE.order_processor:
    class: Drupal\YOURMODULE\OrderProcessor
    arguments: []
    tags:
      - { name: commerce_order.order_processor, priority: 110 }


In YOURMODULE\src\OrderProcessor.php

&lt;?php

namespace Drupal\YOURMODULE;

use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_order\Entity\OrderItemInterface;
use Drupal\commerce_order\OrderProcessorInterface;

class OrderProcessor implements OrderProcessorInterface {

  /**
   * {@inheritdoc}
   */
  public function process(OrderInterface $order) {
    $order_items = $order-&gt;getItems();
    foreach ($order_items as $order_item) {
      if ($order_item-&gt;bundle() == 'YOURCUSTOMBUNDLE') {
        // YOUR LOGIC TO FIGURE OUT $calculated_price
        $price = new Price($calculated_price, $currency)
        // Set to TRUE if you want to override unit price.
        $order_item-&gt;setUnitPrice($price, FALSE);
      }
    }
  }


Hope this helps!