Syntax
public bool IsRawProfitMode( WealthScript obj )
Parameter Description
| obj |
An instance of the WealthScript object |
Description
Returns
true if Strategy was executed in Raw Profit mode, and
false if in Portfolio Simulation mode.
Example
Here is an example illustrating how to use the method in your Strategy code:
using System;
using System.Text;
using WealthLab;
using WealthLab.Indicators;
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" );
}
}
}