public static void AddCommentary( this WealthScript obj, string line ) public static void Display( this WealthScript obj )public void AddLine( string line ) public void Display()
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { for(int bar = Bars.Count-20; bar < Bars.Count; bar++) { // Add a line this.AddCommentary( "Bar Number: " + bar.ToString() ); } // Display Commentary Window this.DisplayCommentary(); } } }
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using Community.Components; // CommentaryWindow here /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Path to the resulting HTML file string path = @"C:\Commentary.html"; // Create an instance of the CommentaryWindow class CommentaryWindow cw = new CommentaryWindow( path ); for(int bar = Bars.Count-20; bar < Bars.Count; bar++) { // Add a line cw.AddLine( "Bar Number: " + bar.ToString() ); } // Display Commentary Window cw.Display(); } } }