Fundamental Data Checker

Modified on 2013/05/11 11:32 by Eugene — Categorized as: Community Components

Syntax

public static int FundamentalSequenceCheck(this WealthScript obj, string item)

public int FundamentalSequenceCheck(string item)


Parameter Description

itemFundamental item to check

Description

A fundamental data checker created by Robert Sucher. Use the FundamentalSequenceCheck routine in any strategy that access fundamental data.

It checks FY/FQ sequence or missing reports, and checks date sequence. If -1 is returned, it's probably giving a green sign to use the fundamental data in a Strategy.

Example

Note: Wealth-Lab Developer users can try entering "[msn] assets" instead of "assets". Make sure you have updated MSN Fundamental data.

Example using C# extension methods:

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using Community.Components; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/

namespace WealthLab.Strategies { public class FundamentalsCheckerDemo : WealthScript { protected override void Execute() { ClearDebug(); // Let's say I want to check the "assets" data before I use it in a script if(this.FundamentalSequenceCheck("assets") != -1) { // stop script processing now return; } PrintDebug( "assets probably okay to use in script..."); } } }


Legacy syntax example:

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using Community.Components; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/

namespace WealthLab.Strategies { public class FundamentalsCheckerDemo : WealthScript { protected override void Execute() { // Create an instance of the class that contains the routine, // passing a WealthScript object as "this" Utility u = new Utility( this ); ClearDebug(); // Let's say I want to check the "assets" data before I use it in a script if(u.FundamentalSequenceCheck("assets") != -1) { // stop script processing now return; } PrintDebug( "assets probably okay to use in script..."); } } }