Syntax
public static DataSource GetDataSource(this WealthScript obj)
public static DataSource GetDataSource(this string dataSetName)
public static DataSource GetDataSource(this int barInterval, string staticProviderString)
public DataSource GetDataSource()
public DataSource GetDataSource(string dataSetName)
public DataSource GetDataSource(int barInterval, string staticProviderString)
Parameter Description
dataSetName | Name of the DataSet associated with the DataSource to be returned |
barInterval | Bar Interval of the DataStore |
staticProviderString | Name of the Static Provider |
Description
GetDataSource is a Utility class function that returns the current DataSource object or the one that will by identified by the specified parameters. GetDataSource is used by the PositionHelper class in order to facilitate locating the WL data files, which are read by the
SetTimeOfDayPriority method.
Example
Example using C# extension methods:
using System;
using System.Text;
using WealthLab;
using WealthLab.Indicators;
namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
// Call the method
DataSource ds = this.GetDataSource();
// The name of this DataSource Provider
PrintDebug( ds.ProviderName );
}
}
}