public static bool IsRawProfitMode(this WealthScript obj)public bool IsRawProfitMode()
using System; using System.Text; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { if( this.IsRawProfitMode() ) PrintDebug( "Raw Profit mode" ); else PrintDebug( "Portfolio Simulation mode" ); } } }
using System; using System.Text; using WealthLab; using WealthLab.Indicators; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { /* Create an instance of the class that holds the method, passing it a WealthScript object (required) as "this" */ Community.Components.Utility u = new Community.Components.Utility(this); // Call the method if( u.IsRawProfitMode() ) PrintDebug( "Raw Profit mode" ); else PrintDebug( "Portfolio Simulation mode" ); } } }