CreatePaneList

Modified on 2013/05/11 10:13 by Eugene — Categorized as: Community Components

Syntax

public static void CreatePaneList(this WealthScript obj, DataSeries[] dsArray) public static void CreatePaneList(this WealthScript obj, List dsList)

public void CreatePaneList(DataSeries[] dsArray) public void CreatePaneList(List dsList)


Parameter Description

dsArrayArray of DataSeries or...
dsList...List of DataSeries

Description

This handy shortcut method allows to plot multiple DataSeries at once w/o having to create ChartPanes. Before using, create a List or an array, add to it as many DataSeries as you like, and then call CreatePaneList.

Example

Example below plots five DataSeries (OHLCV) to an array and plots them at once:

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() { //Creation from array //DataSeries">"> dsArray = new DataSeries[ { Open, Close, High, Low, Volume }; //this.CreatePaneList( dsArray ); //Creation from List List dsList = new List(); dsList.Add(Open); dsList.Add(Close); dsList.Add(High); dsList.Add(Low); dsList.Add(Volume); this.CreatePaneList( dsList ); } } }


Legacy syntax example:

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using Community.Components;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { Utility u = new Utility(this); //Creation from array //DataSeries">"> dsArray = new DataSeries[ { Open, Close, High, Low, Volume }; //u.CreatePaneList( dsArray ); //Creation from List List dsList = new List(); dsList.Add(Open); dsList.Add(Close); dsList.Add(High); dsList.Add(Low); dsList.Add(Volume); u.CreatePaneList( dsList ); } } }