<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Base classes, methods, properties and enumerations.]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/870/" />
	<updated>2013-02-26T13:09:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/870/base-classes-methods-properties-and-enumerations/</id>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18522/#p18522" />
			<content type="html"><![CDATA[<p>where are the base classes and do they will change to expand functionality of FSB&nbsp; !!! </p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2013-02-26T13:09:37Z</updated>
			<id>https://forexsb.com/forum/post/18522/#p18522</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2474/#p2474" />
			<content type="html"><![CDATA[<p>Historical data<br />-----------------------</p><p>The historical forex data is stored in arrays. The length of these arrays is <strong>Bars</strong>.</p><p>The last (newest bar) is the rightmost bar.<br />The first (oldest) bar is the leftmost bar.</p><div class="codebox"><pre><code>DateTime[] Date; // The date and time of bar opening
double[] Open;   // Bar opening price
double[] High;   // Bar highest price
double[] Low;    // Bar lowest price
double[] Close;  // Bar closing price
int[] Volume;    // Tick volume during the bar</code></pre></div><br /><p>Application:</p><p>1. First bar opening price:<br /></p><div class="codebox"><pre><code>double dOpenPrice = Open[0];</code></pre></div><p>2. Last (newest) bar closing price:<br /></p><div class="codebox"><pre><code>double dClosePrice = Close[Bars - 1];</code></pre></div><p>3. Momentum oscillator<br /></p><div class="codebox"><pre><code>int iPeriod = 10; // Period of Momentum
double[] adMomentum = new double[Bars]; // An array to store Momentum

for(int iBar = iPeriod; iBar &lt; Bars; iBar++)
{
    adMomentum[iBar] = Close[iBar] - Close[iBar - 1];
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-11T21:51:48Z</updated>
			<id>https://forexsb.com/forum/post/2474/#p2474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2473/#p2473" />
			<content type="html"><![CDATA[<p>Number of data bars<br />-------------------------------</p><p>int <strong>Bars</strong></p><p>It show the number of loaded historical data bars.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-11T21:34:15Z</updated>
			<id>https://forexsb.com/forum/post/2473/#p2473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2472/#p2472" />
			<content type="html"><![CDATA[<p>Digits<br />----------------------------</p><p>int <strong>Digits</strong></p><p>It shows the number of digits after the decimal point of the historical data.</p><br /><p>Examples:</p><p>For EURUSD 1.3245 Digits = 4<br />For USDJPY 103.22 Digits = 2</p><div class="codebox"><pre><code>Point = Math.Pow(10, -Digits);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-11T21:29:00Z</updated>
			<id>https://forexsb.com/forum/post/2472/#p2472</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2471/#p2471" />
			<content type="html"><![CDATA[<p>Value of one pip<br />----------------------------</p><p>double <strong>Point</strong></p><p>A <strong>Point</strong> represents the smallest price change that a given exchange rate can make.</p><br /><p>Examples:</p><p>For EURUSD 1.3245 one point is 0.0001<br />For USDJPY 103.22 one point is 0.01</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-11T21:16:52Z</updated>
			<id>https://forexsb.com/forum/post/2471/#p2471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2470/#p2470" />
			<content type="html"><![CDATA[<p>Data Period<br />-------------------------</p><p>DataPeriods <strong>Period </strong></p><p>It gets the time frame of the currently loaded instrument.<br />The value of each period is equal to its duration in minutes.</p><div class="codebox"><pre><code>public enum DataPeriods
{
    min1  = 1,
    min5  = 5,
    min15 = 15,
    min30 = 30,
    hour1 = 60,
    hour4 = 240,
    day   = 1440,
    week  = 10080
}</code></pre></div><p>Application:<br />-------------------------</p><p>1. Setting a variable to <strong>DataPeriods</strong></p><div class="codebox"><pre><code>DataPeriods myPeriod = DataPeriods.min5;</code></pre></div><p>Result: myPeriod is 5 minutes</p><br /><p>2. Checking if a given chart is a daily chart:</p><div class="codebox"><pre><code>if(Period == DataPeriods.day)
{
  // This is daily chart
}
else
{
  // This is not a daily chart
}</code></pre></div><br /><p>3. Converting DataPeriods to minutes</p><div class="codebox"><pre><code>int iMinutes = (int)DataPeriod.day;</code></pre></div><p>Result: iMinutes = 1440</p><br /><p>4. Converting minutes to DataPeriods</p><div class="codebox"><pre><code>DataPeriods myPeriod = (DataPeriods)60;</code></pre></div><p>Result: myPeriod = DataPeriods.hour1</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-11T21:08:06Z</updated>
			<id>https://forexsb.com/forum/post/2470/#p2470</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Base classes, methods, properties and enumerations.]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/2466/#p2466" />
			<content type="html"><![CDATA[<p>Every indicator (original or custom) inherits the base class <strong>Indicator</strong>. This base class provides the common indicator architecture. It provides also access to the historical prices and market information:</p><div class="codebox"><pre><code>        /// &lt;summary&gt;
        /// Time frame of the loaded historical data
        /// &lt;/summary&gt;
        protected static DataPeriods Period { get { return Data.Period; } }

        /// &lt;summary&gt;
        /// The minimal price change.
        /// &lt;/summary&gt;
        protected static double Point { get { return Data.InstrProperties.Point; } }

        /// &lt;summary&gt;
        /// Number of digits after the decimal point of the historical data.
        /// &lt;/summary&gt;
        protected static int Digits { get { return Data.InstrProperties.Digits; } }

        /// &lt;summary&gt;
        /// Number of loaded bars
        /// &lt;/summary&gt;
        protected static int Bars { get { return Data.Bars; } }

        /// &lt;summary&gt;
        /// Bar opening price
        /// &lt;/summary&gt;
        protected static double[] Open { get { return Data.Open; } }

        /// &lt;summary&gt;
        /// Bar opening date and time
        /// &lt;/summary&gt;
        protected static DateTime[] Date { get { return Data.Date; } }

        /// &lt;summary&gt;
        /// Bar highest price
        /// &lt;/summary&gt;
        protected static double[] High { get { return Data.High; } }

        /// &lt;summary&gt;
        /// Bar lowest price
        /// &lt;/summary&gt;
        protected static double[] Low { get { return Data.Low; } }

        /// &lt;summary&gt;
        /// Bar closing price
        /// &lt;/summary&gt;
        protected static double[] Close { get { return Data.Close; } }

        /// &lt;summary&gt;
        /// Bar volume
        /// &lt;/summary&gt;
        protected static int[] Volume { get { return Data.Volume; } }
 </code></pre></div><p>The base classes are available for download here: <a href="http://forexsb.com/downloads/Indicators_Base.zip">Indicators_Base.zip</a></p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-05-10T21:13:48Z</updated>
			<id>https://forexsb.com/forum/post/2466/#p2466</id>
		</entry>
</feed>
