﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Can you please explain about this code line?</title>
  <id>~/topic/10802/can-you-please-explain-about-this-code-line/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-19T12:27:12Z</updated>
  <logo>https://stocksharp.com/images/logo.png</logo>
  <link href="https://stocksharp.com/handlers/atom.ashx?category=topic&amp;id=10802" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.com/posts/m/47854/</id>
    <title type="text">Position 5 means 5 BTC in most of popular exchanges. Minus position are possible for crypto exchange...</title>
    <published>2019-06-20T13:17:08Z</published>
    <updated>2019-06-20T13:17:08Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Position 5 means 5 BTC in most of popular exchanges. Minus position are possible for crypto exchanges with future contracts. For margin trading it is not allowed and you need modify the algorithm.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47842/</id>
    <title type="text">Following up previous question, if &amp;quot;Position=-5&amp;quot; here, then what does it mean? Does it mean that I h...</title>
    <published>2019-06-18T23:42:24Z</published>
    <updated>2019-06-18T23:44:14Z</updated>
    <author>
      <name>Pandotex</name>
      <uri>https://stocksharp.com/users/104419/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Following up previous question, if &amp;quot;Position=-5&amp;quot; here, then what does it mean?
Does it mean that I have 5 USDT in my account of exchange website?&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47841/</id>
    <title type="text">Thanks for your explanation. But I still don&amp;apos;t understand &amp;quot;Position&amp;quot; here. Lets say Position=5 in he...</title>
    <published>2019-06-18T23:42:16Z</published>
    <updated>2019-06-18T23:42:16Z</updated>
    <author>
      <name>Pandotex</name>
      <uri>https://stocksharp.com/users/104419/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Thanks for your explanation.
But I still don't understand &amp;quot;Position&amp;quot; here.
Lets say &lt;code&gt;Position=5&lt;/code&gt; in here. Then what does it mean for? (selected security is BTC/USDT)
Then it means that I own 5 BTC?&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47828/</id>
    <title type="text">The line mean Revert position. For this operation required double time position with opposite sign. ...</title>
    <published>2019-06-17T14:35:00Z</published>
    <updated>2019-06-17T14:35:00Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;The line mean Revert position. For this operation required double time position with opposite sign. To convert for example 5 position to -5 we need 10 sell order. Min is just modification. You can remote it (remember that is just examples).&lt;/p&gt;
&lt;p&gt;SMA works with any market. It depends from connectors, but not from algo.&lt;/p&gt;
&lt;p&gt;Orders are not affected on positions. Only trades.&lt;/p&gt;
&lt;p&gt;Short positions can possibly on markets or brokers that allow that.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47826/</id>
    <title type="text">I assume that that &amp;quot;SmaStrategy.cs&amp;quot; only works with spot trading (no margin or leverage trading). Gi...</title>
    <published>2019-06-17T12:33:56Z</published>
    <updated>2019-06-17T12:33:56Z</updated>
    <author>
      <name>Pandotex</name>
      <uri>https://stocksharp.com/users/104419/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;I assume that that &amp;quot;SmaStrategy.cs&amp;quot; only works with spot trading (no margin or leverage trading).
Given that it is true, I don't understand why we use &amp;quot;position&amp;quot; term here.
Because as long as I understand, &amp;quot;position&amp;quot; term (open position, long position, short position) are only being used in leverage trading.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47825/</id>
    <title type="text">I can understand &amp;quot;Volume is parameterizable option&amp;quot;. but I still don&amp;apos;t understand that line. Would y...</title>
    <published>2019-06-17T12:02:44Z</published>
    <updated>2019-06-17T12:02:44Z</updated>
    <author>
      <name>Pandotex</name>
      <uri>https://stocksharp.com/users/104419/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;I can understand &amp;quot;Volume is parameterizable option&amp;quot;. but I still don't understand that line. Would you please elaborate more?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;var volume = Position == 0 ? Volume : Position.Abs().Min(Volume) * 2;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;Position == 0&amp;quot; means, there are no active orders for selected security?
Why they're comparing to find min value like &amp;quot;Position.Abs().Min(Volume)&amp;quot;? After that why they're multiplying by 2?&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47823/</id>
    <title type="text">Position means this one https://www.investopedia.com/terms/p/positiontrader.asp Volume is parameteri...</title>
    <published>2019-06-17T11:37:59Z</published>
    <updated>2019-06-17T11:37:59Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Position means this one &lt;a href="https://www.investopedia.com/terms/p/positiontrader.asp" rel="nofollow" target="_blank"&gt;https://www.investopedia.com/terms/p/positiontrader.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Volume is parameterizable option. You can skip it is your code, but in that case size of your trading algo will be hard coded.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47821/</id>
    <title type="text">Hello Stocksharp team. Can you please explain in detail what&amp;apos;s the meaning of this line? https://git...</title>
    <published>2019-06-17T07:03:10Z</published>
    <updated>2019-06-17T11:31:38Z</updated>
    <author>
      <name>Pandotex</name>
      <uri>https://stocksharp.com/users/104419/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Hello Stocksharp team.&lt;/p&gt;
&lt;p&gt;Can you please explain in detail what's the meaning of this line?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/StockSharp/StockSharp/blob/master/Samples/Testing/SampleHistoryTesting/SmaStrategy.cs#L109" target="_blank"&gt;https://github.com/StockSharp/StockSharp/blob/master/Samples/Testing/SampleHistoryTesting/SmaStrategy.cs#L109&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here what &amp;quot;Position&amp;quot;, &amp;quot;Volume&amp;quot; means for?&lt;/p&gt;
&lt;p&gt;As long as I understand, position means this one?
&lt;a href="https://www.investopedia.com/terms/o/open-position.asp" rel="nofollow" target="_blank"&gt;https://www.investopedia.com/terms/o/open-position.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>