{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "
Installed Packages
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/markdown": [ "Loading extensions from `Plotly.NET.Interactive.dll`" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#r \"nuget: Plotly.NET\"\n", "#r \"nuget: Plotly.NET.Interactive\"\n", "#r \"nuget: QuanTAlib\"\n", "\n", "using Plotly.NET;\n", "using Plotly.NET.LayoutObjects;\n", "using QuanTAlib;" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [], "source": [ "List x = new() {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96};\n", "List Spike = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n", "List Impulse = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};\n", "List Triangle = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2};\n", "List Sawtooth = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n", "List Sine = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0.39,0.56,0.72,0.84,0.93,0.99,1,0.97,0.91,0.81,0.68,0.52,0.33,0.14,-0.06,-0.26,-0.44,-0.61,-0.76,-0.87,-0.95,-0.99,-1,-0.96,-0.88,-0.77,-0.63,-0.46,-0.28,-0.08,0.12,0.31,0.49,0.66,0.79,0.9,0.97,1,0.99,0.94,0.85,0.73,0.58,0.41,0.22,0.02,-0.17,-0.37,-0.54,-0.7,-0.83,-0.92,-0.98,-1,-0.98,-0.92,-0.82,-0.69,-0.54,-0.36,-0.17,0.03,0.23,0.42,0.59,0.74};\n", "List Chirp = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0.93,0.27,-0.59,-1,-0.71,0.05,0.75,1,0.67,0,-0.67,-0.99,-0.85,-0.34,0.31,0.81,1,0.82,0.35,-0.22,-0.71,-0.98,-0.95,-0.66,-0.2,0.31,0.72,0.96,0.98,0.78,0.43,-0.01,-0.43,-0.77,-0.96,-0.99,-0.85,-0.58,-0.23,0.16,0.51,0.79,0.95,1,0.92,0.73,0.47,0.15,-0.17,-0.47,-0.72,-0.9,-0.99,-0.99,-0.9,-0.74,-0.52,-0.26,0.01,0.28,0.53,0.73,0.88,0.97,1,0.97};\n", "List White = new() {-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,0.03,-0.4,-0.47,0.19,-0.4,-0.23,0.31,0.41,0.19,0.16,-0.5,-0.31,-0.21,0.25,0.18,-0.48,-0.1,0.38,0.29,-0.38,-0.08,-0.21,0.34,0.01,-0.46,0.28,-0.48,0.11,0.02,-0.37,0.19,-0.2,0.1,0.24,0.08,-0.22,-0.12,0.15,0.36,-0.43,-0.03,-0.32,0.45,-0.5,-0.04,-0.04,-0.08,-0.18,0.13,-0.33,-0.19,0.36,-0.39,0.2,-0.31,0.28,-0.13,-0.07,-0.29,0.37,0.03,-0.25,-0.06,-0.3,-0.08,-0.09};\n", "List Gauss = new() {-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,0,0.03,0.11,-0.1,-0.43,-0.08,0.36,-0.04,-0.04,-0.21,-0.3,0.26,0.2,0.28,0.2,0.27,-0.01,-0.1,-0.23,-0.13,-0.41,-0.23,-0.07,-0.21,0.32,-0.18,-0.48,0.3,0.46,-0.2,0.52,-0.81,-0.25,-0.21,-0.12,-0.18,0.18,0.52,0.29,0.44,0.18,-1.2,0.38,0.24,0.06,0.28,0.34,0.3,-0.13,0.19,-0.5,0.59,-0.36,0.22,-0.23,0.24,0.39,0.13,-0.33,-0.57,-0.23,0.49,-0.13,0.76,0.59,0.61};\n", "List B = new() {-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0.4,-0.4,0,-0.28,0.41,-0.54,0.65,-0.75,0.84,-0.91,0.96,-0.99,1,-0.99,0.96,-0.92,0.85,-0.77,0.67,-0.56,0.44,-0.3,0.17,-0.03,-0.11,0.25,-0.39,0.51,-0.63,0.73,-0.82,0.89,-0.95,0.98,-1,0.99,-0.97,0.93,-0.86,0.78,-0.69,0.58,-0.46,0.33,-0.19,0.05,0.09,-0.23,0.36,-0.49,0.61,-0.71,0.81,-0.88,0.94,-0.98,1,-1,0.98,-0.94,0.88,-0.8,0.71,-0.6,0.48,-0.35,0.22,-0.08,-0.06};\n", "List HF = new() {-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,-0.6,0.6,0,0.14,-0.76,-0.96,-0.28,0.66,0.99,0.41,-0.54,-1,-0.54,0.42,0.99,0.65,-0.29,-0.96,-0.75,0.15,0.91,0.84,-0.01,-0.85,-0.91,-0.13,0.76,0.96,0.27,-0.66,-0.99,-0.4,0.55,1,0.53,-0.43,-0.99,-0.64,0.3,0.96,0.75,-0.16,-0.92,-0.83,0.02,0.85,0.9,0.12,-0.77,-0.95,-0.26,0.67,0.99,0.4,-0.56,-1,-0.52,0.44,0.99,0.64,-0.3,-0.97,-0.74,0.17,0.92,0.83,-0.03,-0.86};\n", "List ImpulseHF = new() {-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0,0,0.05,-0.25,-0.32,-0.09,0.22,0.33,0.14,-0.18,-0.33,-0.18,0.14,0.33,0.22,-0.1,-0.32,-0.25,0.05,0.3,0.28,0,-0.28,-0.3,-0.04,0.25,0.32,0.09,-0.22,-0.33,-0.13,0.18,0.33,0.18,0.86,0.67,0.79,1.1,1.32,1.25,0.95,0.69,0.72,1.01,1.28,1.3,1.04,0.74,0.68,0.91,1.22,1.33,1.13,0.81,0.67,0.83,1.15,1.33,1.21,0.9,0.68,0.75,1.06,1.31,1.28,0.99,0.71};\n", "List SawtoothHF = new() {-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0,0,2.7,-0.8,-0.8,3.6,9.3,11.95,10.05,6.3,5,8.3,14.1,17.95,17.25,13.55,11.2,13.25,18.75,23.55,24.2,20.95,17.75,18.45,23.35,28.8,30.8,28.35,24.7,24.05,28,33.75,37,35.65,31.85,28.05,-3.2,1.5,4.8,3.75,-0.8,-4.6,-4.15,0.1,4.25,4.5,0.6,-3.85,-4.75,-1.3,3.35,4.95,2,-2.8,-5,-2.6,2.2,4.95,3.2,-1.5,-4.85,-3.7,0.85,4.6,4.15,-0.15,-4.3};\n", "List SineG = new() {-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0.2,-0.2,0,0,0.59,0.83,0.74,0.5,0.91,1.36,0.93,0.87,0.6,0.38,0.78,0.53,0.42,0.14,0.01,-0.45,-0.71,-0.99,-1,-1.36,-1.22,-1.07,-1.17,-0.56,-0.95,-1.11,-0.16,0.18,-0.28,0.64,-0.5,0.24,0.45,0.67,0.72,1.15,1.52,1.28,1.38,1.03,-0.47,0.96,0.65,0.28,0.3,0.17,-0.07,-0.67,-0.51,-1.33,-0.33,-1.34,-0.78,-1.21,-0.68,-0.43,-0.56,-0.87,-0.93,-0.4,0.52,0.1,1.18,1.18,1.35};\n", "List ChirpG = new() {0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,0,0.01,1.3,0.3,-0.48,-1.1,-1.14,-0.03,1.11,0.96,0.63,-0.21,-0.97,-0.73,-0.65,-0.06,0.51,1.08,0.99,0.72,0.12,-0.35,-1.12,-1.21,-1.02,-0.87,0.12,0.13,0.24,1.26,1.44,0.58,0.95,-0.82,-0.68,-0.98,-1.08,-1.17,-0.67,-0.06,0.06,0.6,0.69,-0.41,1.33,1.24,0.98,1.01,0.81,0.45,-0.3,-0.28,-1.22,-0.31,-1.35,-0.77,-1.13,-0.5,-0.13,-0.13,-0.32,-0.29,0.3,1.22,0.75,1.73,1.59,1.58};\n", "List Complex = new() {175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.1,175.6,175.44,176.27,176.04,176.99,175.49,175.68,174.34,176.4,174.05,174.4,174.2,176.16,175,177.72,174.33,176.96,174.62,174.76,170.9,171.12,171.05,170.01,169.24,172.64,171.96,175.72,174.16,175.81,177.3,178.38,176.75,177.19,175.55,178.49,176.52,178.45,178.04,178.25,177.8,176.97,172.94,174.92,173.98,172.29,171.19,172.54,172.11,175.32,175.63,176.65,173.8,176.04,172.74,175.24,171.84,171.54,172.17,171.85,172.38,170.78,173.49,173.69,171.71,174.38,173.99,174.83};\n", "List Market = new() {68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,68.75,68.25,67.75,67.75,72.75,74.75,72.25,71.25,71.75,72.75,77.75,76,76,76,74.75,75.5,74.75,73.75,74,74.75,72.25,72.5,72.25,74.5,74.75,75.75,75.75,75.75,74.25,73.75,74.75,72,71.75,72.5,72.25,71,72,71.75,71.75,73.25,72.5,73.75,74,76.75,75.75,75,75.75,74.5,74.25,73.5,71.75,70.5,69,70.5,70,68.75,67.25,68.5,70.75,70,70.5,68.25,68.25,68.25,63.75,64.25};\n" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [], "source": [ "TSeries data = new();\n", "\n", "// change these two values - the period and the type of observed indicator\n", "// currently available indicators are: DEMA_Series, EMA_Series, HEMA_Series, HMA_Series, JMA_Series, RMA_Series, SMA_Series, TEMA_Series, WMA_Series and ZLEMA_Series\n", "int Period = 20;\n", "ZLEMA_Series indicator=new(source: data, period: Period);\n", "\n", "//On charts below, blue line is the data input, the green line is a JMA reference" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Spike;\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Spike\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Impulse;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Impulse\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Triangle;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x, series, false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Triangle\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Sawtooth;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Sawtooth\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Sine;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Sine\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Chirp;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Chirp\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = White;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"White\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Gauss;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Gauss\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = B;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"B\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = HF;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"HF\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = ImpulseHF;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"ImpulseHF\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = SawtoothHF;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"SawtoothHF\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = SineG;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"SineG\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = ChirpG;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"ChirpG\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Complex;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Complex\");\n", "chart" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "dotnet_interactive": { "language": "csharp" }, "vscode": { "languageId": "dotnet-interactive.csharp" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\r\n", "\r\n", "\n", " \n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var series = Market;\n", "data = new();\n", "indicator=new(source: data, period: Period);\n", "HMA_Series reference = new(source: data, period: Period);\n", "for (int i=0; i(x,series,false,\"data\").WithLineStyle(Width: 1.0, Color: Color.fromString(\"blue\"));\n", "GenericChart.GenericChart ch2 = Chart2D.Chart.Line(x,indicator.v,false,\"sig\").WithLineStyle(Width: 2, Color: Color.fromString(\"red\"));\n", "GenericChart.GenericChart ch3 = Chart2D.Chart.Line(x,reference.v,false,\"ref\").WithLineStyle(Width: 1.5, Color: Color.fromString(\"green\"));\n", "var chart = Chart.Combine(new []{ch1,ch2,ch3}).WithSize(1200,400).WithMargin(Margin.init(1,1,60,1,1,false)).WithTitle(\"Maket\");\n", "chart" ] } ], "metadata": { "kernelspec": { "display_name": ".NET (C#)", "language": "C#", "name": ".net-csharp" }, "language_info": { "name": "C#" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }