Log in to see Cloud of Tags

Wealth-Lab Wiki

WinLossBackground

RSS

Syntax

public static void WinLossBackground(this WealthScript obj, int mode)

public void WinLossBackground( int mode )

Parameter Description

modemode selects the color scheme: 0 standard (light red, light green), 1 strong (red, light red, yellow, light green green)

Description

Originally developed for WL4 by Dr.Koch and coded for WL5 by thodder.

Paints background according to profit. Handles overlapping positions. With overlapping positions the worst trade determines the background color. Trades better than 0.5 percent are marked green. Trades worse than -0.5 percent are marked red. The trades between -0.5% and +0.5 % are marked yellow. In mode 1 trades better/worse than +5%/-5% are marked with a stronger green/red color.

Usage

Add a call to WinLossBackground(mode) after the main (trading) loop i.e. at the end of your Strategy.

Example

Here is an example illustrating how to use the method in your Strategy code:

Example using C# extension methods:


// after the main (trading) loop

this.WinLossBackground(1);

Image

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.