Log in to see Cloud of Tags

Wealth-Lab Wiki

GetDataRange

RSS

Syntax


public static BarDataRange GetDataRange(WealthScript obj)

public BarDataRange GetDataRange( WealthScript obj )

Parameter Description

objAn instance of the WealthScript object

Description

Returns an instance of BarDataRange object containing a serialized string with the data range the strategy is being executed upon. Example:

FixedBars;500;10;01.01.2014 0:00:00;01.01.2015 0:00:00

Works in Strategy windows, does not work in Strategy Monitor.

Example

Here's a short snippet illustrating how to call the method in your Strategy code:

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() { PrintDebug( this.GetDataRange() ); } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.