Description
This version of the DiNapoli Stochastic has a smoother indicator and extra logic to match the curve of the lines to identify possible price reversal with linear curve fitting. We also included many useful features like email, sound alerts, high and low thresholds. The indicator can be used with a trading robot as it provides public properties for Buy and Sells signals.
This oscillator smoothing method leads to filtering out "noise" in the price movement. It is used in the strategies that are oriented to a standard stochastic. The stronger smoothing can lead to loss of an array of signals, so it is recommended to apply any trend indicator for more efficient use of the indicator and its signals filtering.
Read more about this type of indicator by Joe Dinapoli "Trading With DiNapoli Levels".
Features
- Buy and Sell Threshold - this is the high and low for triggering a signal event
- Email Alert - sends you an email
- Sound Alert - the sound file path is configurable
- Arrows are drawn on chart - this plots an arrow each time a crossover occurs, you can turn this on or off
- FastK, SlowK and SlowD - configurable parameters
- Linear Curve Check
- Cross-over distance Check
- Data Analysis Mode
- Public properties for robots - IsBullish and IsBearish signals
There are two checks for identifying price reversals, you can modify the settings and the arrows which signal Buy or Sell are only shown where the optimal reversals occur.
Cross-Over Check
This involves a very simple, but useful check on the distance between the signal and result lines using the cross-over distance setting when there is indecision in the price the two lines are very close together when there is a strong change direction the distance is higher.
Linear Regression Curve Check
This is very useful when you want to match a specific type of curve which mostly show price reversals, it uses the Math.Net Numerics library described below for curve fitting. You can curve fit either the signal or the result line. The settings are Curve Offset and Curve Slope.
For analysis, you can use a setting called Data Analysis Mode which will show you historical curve values in the log file to help you match the values which hold the strongest weight. The video below will explain the features in more detail.
Math.NET Numerics
This assembly aims to expose algorithms and methods for numerical computations in software engineering, the areas it covers are special functions, linear algebra, probability models, random numbers, interpolation, integration, regression, optimization problems and much more. We use this library to help us fit the curve on the stochastic result and signal lines.
Math.NET Numerics - http://numerics.mathdotnet.com
Curve Fitting: Linear Regression
Regression is all about fitting a low order parametric model or curve data, so we can use it to make predictions on points not covered by the data. Both the data and the model are known, but we'd like to find the parameters that make the model good enough to the data according to some metric.
You can see from the diagram below where the white arrows are drawn that the fake cross-over signals are filtered out and where the red and green arrows are drawn you will get signals to buy or sell.
Curve fitting can involve either interpolation, where an exact fit to the data is required, or smoothing, in which a "smooth" function is constructed that approximately fits the data.
Data Analysis Mode
We have added a feature which will allow you to visually see the Linear Curve fitted values for the stochastic cross-over points so that you can compare this to the candle price action to help you increase the probability of a successful entry point.
https://youtu.be/wRYgvKqE1-o?list=PLVkMnR8pfWHENp3K7i1JRvvxmXJzPbLIt
Contact: instant chat group
Website: https://clickalgo.com
Twitter | Facebook | YouTube | Pinterest | LinkedIn
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Windows.Forms;
using System.Threading;
// To download the software please visit: https://clickalgo.com/ctrader-dinapoli-stochastic-linear-curve-fitting"
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class ClickAlgoSoftware : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
private static Mutex dialogMutex = new Mutex();
private static bool dialogIsShownOnce = false;
protected override void OnStart()
{
ShowDialogBox();
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
public static void ShowDialogBox()
{
dialogMutex.WaitOne();
if (dialogIsShownOnce)
return;
var ret = MessageBox.Show("It is not possible to download the software from the cTDN website.\nWould you like to visit us at ClickAlgo.com where you can download it?", "Downloading...", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (ret == DialogResult.Yes)
{
System.Diagnostics.Process.Start("https://clickalgo.com/ctrader-dinapoli-stochastic-linear-curve-fitting");
}
dialogIsShownOnce = true;
dialogMutex.ReleaseMutex();
}
}
}
ClickAlgo
Joined on 05.02.2015
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: ClickAlgo Software.algo
- Rating: 0
- Installs: 7480
- Modified: 13/10/2021 09:54
Please note we cannot upload the indicator use to references to the Math.Net library, please visit the blog to download.