Log in to see Cloud of Tags

Wealth-Lab Wiki

Syntax

public static void RunProgram(this string ProgramName, bool Wait)

public void RunProgram( string ProgramName, bool Wait )

Parameter Description

ProgramNameExecutable file
WaitTrue: resume Strategy execution only after the program terminates;

Description

Executes the specified program file, ProgramName.exe. If the Wait parameter is true, the Strategy resumes executing only after the program terminates. Otherwise it will continue executing immediately after the application is launched.

Example

Example using C# extension methods:


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() { // Launches Notepad by calling RunProgram string programName = "notepad.exe"; programName.RunProgram( false ); } } }

Legacy syntax example:


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Components; // RunProgram here
/*** 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 and pass WealthScript as "this" Utility u = new Utility( this );

// Launches Notepad by calling RunProgram u.RunProgram( "notepad.exe", false ); } } }

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.