Enter Quandl auth token in Data Manager
https://www.quandl.com/CHRIS/ICE_B1-ICE-Brent-Crude-Oil-Futures-Continuous-Contract-1-B1-Front-Month
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { Random r = new Random(); private Color RandomColor() { Color randomColor = Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)); return randomColor; } protected override void Execute() { if( Bars.HasNamedDataSeries ) { ChartPane p = CreatePane( 100, true, true ); foreach( DataSeries ds in Bars.NamedSeries ) PlotSeries( p, ds, RandomColor(), LineStyle.Solid, 1 ); } else PrintDebug( Bars.Symbol + " does not contain named series" ); } } }
CoT data by Quandl
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 use on symbols containing legacy series i.e. symbols ending with "_L_ALL" if( Bars.HasNamedDataSeries ) { DataSeries cl = Bars.FindNamedSeries("Commercial Long"); DataSeries cs = Bars.FindNamedSeries("Commercial Short"); DataSeries diff = cl - cs; RSI rsiDiff = RSI.Series( diff, 2 ); rsiDiff.Description = "RSI on Difference between Commercial Long/Short"; if( cl != null && cs != null ) { ChartPane p2 = CreatePane( 25, true, true ); ChartPane p1 = CreatePane( 25, true, true ); ChartPane p = CreatePane( 25, true, true ); PlotSeries( p, cl, Color.Green, LineStyle.Solid, 1 ); PlotSeries( p, cs, Color.Red, LineStyle.Solid, 1 ); PlotSeries( p1, diff, Color.Blue, LineStyle.Histogram, 2 ); PlotSeriesOscillator( p2, rsiDiff, 70, 30, Color.FromArgb(30,Color.Red), Color.FromArgb(30,Color.Blue), Color.DarkMagenta, LineStyle.Solid, 1 ); } } else PrintDebug( Bars.Symbol + " does not contain named series" ); } } }
US Treasury data by Quandl
AAII data by Quandl
if( Bars.HasNamedDataSeries && Bars.Symbol == "AAII/AAII_SENTIMENT" ) { DataSeries bu = Bars.FindNamedSeries("Bullish"); DataSeries be = Bars.FindNamedSeries("Bearish"); DataSeries n = Bars.FindNamedSeries("Neutral"); DataSeries s = Bars.FindNamedSeries("Bull-Bear Spread"); if(bu != null && be != null && n != null && s != null) { ChartPane p1 = CreatePane( int.MaxValue, true, true ); ChartPane p = CreatePane( int.MaxValue, true, true ); PlotSeries( p, bu, Color.Green, LineStyle.Solid, 2 ); PlotSeries( p, be, Color.Red, LineStyle.Solid, 2 ); PlotSeries( p, n, Color.DarkBlue, LineStyle.Solid, 1 ); PlotSeries( p1, s, Color.Blue, LineStyle.Histogram, 2 ); } } else PrintDebug( Bars.Symbol + " does not contain named series" );
if( Bars.Symbol == "NYXDATA/MARKET_CREDIT" ) { if( Bars.HasNamedDataSeries ) { DataSeries md = Bars.FindNamedSeries("Margin debt"); DataSeries fc = Bars.FindNamedSeries("Free credit cash accounts"); DataSeries cb = Bars.FindNamedSeries("Credit balances in margin accounts"); if(md != null && fc != null && cb != null) { ChartPane p = CreatePane( int.MaxValue, true, true ); PlotSeries( p, md, Color.Red, LineStyle.Solid, 2 ); PlotSeries( p, fc, Color.Green, LineStyle.Solid, 2 ); PlotSeries( p, cb, Color.Violet, LineStyle.Solid, 1 ); } } else PrintDebug( Bars.Symbol + " does not contain named series" ); }
NAAIM data by Quandl
if( Bars.HasNamedDataSeries && Bars.Symbol == "NAAIM/NAAIM" ) { DataSeries n = Bars.FindNamedSeries("NAAIM Exposure Index"); DataSeries bu = Bars.FindNamedSeries("NAAIM Most Bullish"); DataSeries be = Bars.FindNamedSeries("NAAIM Most Bearish"); DataSeries q1 = Bars.FindNamedSeries("NAAIM 1st Quartile"); DataSeries q2 = Bars.FindNamedSeries("NAAIM 2nd Quartile"); DataSeries q3 = Bars.FindNamedSeries("NAAIM 3rd Quartile"); DataSeries sd = Bars.FindNamedSeries("NAAIM Standard Deviation"); DataSeries num = Bars.FindNamedSeries("NAAIM number"); if(n != null && bu != null && be != null && q1 != null && q2 != null && q3 != null && sd != null && num != null) { ChartPane p1 = CreatePane( int.MaxValue, true, true ); ChartPane p = CreatePane( int.MaxValue, true, true ); PlotSeries( p, bu, Color.Green, LineStyle.Solid, 2 ); PlotSeries( p, be, Color.Red, LineStyle.Solid, 2 ); PlotSeries( p, q1, Color.DarkBlue, LineStyle.Solid, 1 ); PlotSeries( p, q2, Color.DarkGray, LineStyle.Solid, 1 ); PlotSeries( p, q3, Color.DarkMagenta, LineStyle.Solid, 1 ); PlotSeries( p, num, Color.Green, LineStyle.Solid, 1 ); PlotSeries( p1, n, Color.Black, LineStyle.Histogram, 3 ); } } else PrintDebug( Bars.Symbol + " does not contain named series" );