Skip to content

Commit ed48f42

Browse files
authored
Update zero-price-error.html
1 parent 9558fa0 commit ed48f42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
If you subscribe to a security and place an order for the security in the same <a href='/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices'>time step</a>, you'll get this error. To avoid this order response error, <a href='/docs/v2/writing-algorithms/initialization#07-Set-Security-Initializer'>initialize the security price</a> with the last known price.</p>
1+
If you subscribe to a security and place an order for the security in the same <a href='/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices'>time step</a>, you'll get this error. To avoid this order response error, enable the <code class='python'>seed_initial_prices</code><code class='csharp'>SeedInitialPrices</code> <a href='/docs/v2/writing-algorithms/initialization#10-Set-Algorithm-Settings'>setting</a> to seed new assets with their last known price.</p>
22

33
<div class="section-example-container">
4-
<pre class="csharp">SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));</pre>
5-
<pre class="python">self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))</pre>
4+
<pre class="csharp">Settings.SeedInitialPrices = true;</pre>
5+
<pre class="python">self.settings.seed_initial_prices = True</pre>
66
</div>

0 commit comments

Comments
 (0)