Page 70 of 74

Re: DSL (Discontinued Signal Line) indicators

Posted: Thu Feb 16, 2023 2:25 pm
by mrtools
太虚一毫 wrote: Thu Feb 16, 2023 2:07 pm Operating normally! The buttons are perfect. :thumbup:

But the algorithm is slightly different from the old version? Seems older versions signal better (fewer signals).
Was checking my comments when I first posted it looks like I made a separate setting for the dsl signal period something the mt5 version didn't have, must have had a larger signal period to have fewer signals, anyway, added a signal period.

PS: To avoid confusion, the updated version has been attached to the original post.

Re: DSL (Discontinued Signal Line) indicators

Posted: Fri Feb 17, 2023 10:23 am
by Chickenspicy
If coders can convert, there is source code for non repaint half trend for cTrader, if can be converted

Re: DSL (Discontinued Signal Line) indicators

Posted: Fri Feb 17, 2023 1:05 pm
by Chickenspicy

Code: Select all

using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
 
namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class mHalfTrendNew : Indicator
    {
        [Parameter("Period (5) ", DefaultValue = 5, Group = "Main")]
        public int inpAmplitude { get; set; }
        [Parameter("MA Smooth Type", DefaultValue = MovingAverageType.Simple, Group = "Main")]
        public MovingAverageType MaTypeSmooth { get; set; }
 
 
        [Output("Half Trend New", LineColor = "Black", PlotType = PlotType.Line, LineStyle = LineStyle.Solid, Thickness = 1)]
        public IndicatorDataSeries outHTn { get; set; }
        [Output("Half Trend New - Bullish", LineColor = "Green", PlotType = PlotType.DiscontinuousLine, LineStyle = LineStyle.Solid, Thickness = 2)]
        public IndicatorDataSeries outHTnBullish { get; set; }
        [Output("Half Trend New - Bearish", LineColor = "Red", PlotType = PlotType.DiscontinuousLine, LineStyle = LineStyle.Solid, Thickness = 2)]
        public IndicatorDataSeries outHTnBearish { get; set; }
 
 
        private MovingAverage _mah;
        private MovingAverage _mal;
        private IndicatorDataSeries _hh;
        private IndicatorDataSeries _ll;
        private IndicatorDataSeries _htn;
        private IndicatorDataSeries _htnbullish;
        private IndicatorDataSeries _htnbearish;
 
 
        protected override void Initialize()
        {
            _mah = Indicators.MovingAverage(Bars.HighPrices, inpAmplitude, MaTypeSmooth);
            _mal = Indicators.MovingAverage(Bars.LowPrices, inpAmplitude, MaTypeSmooth);
            _hh = CreateDataSeries();
            _ll = CreateDataSeries();
            _htn = CreateDataSeries();
            _htnbullish = CreateDataSeries();
            _htnbearish = CreateDataSeries();
        }
 
        public override void Calculate(int i)
        {
            if (i < inpAmplitude + 2)
            {
                _htn[i] = _htnbullish[i] = _htnbearish[i] = Bars.ClosePrices[i];
                outHTn[i] = _htn[i];
                outHTnBullish[i] = _htnbullish[i];
                outHTnBearish[i] = _htnbearish[i];
                return;
            }
 
            _hh[i] = Bars.HighPrices.Maximum(inpAmplitude - 1);
            _ll[i] = Bars.LowPrices.Minimum(inpAmplitude - 1);
 
 
            _htn[i] = _htn[i - 1];
            _htnbullish[i] = _htnbullish[i - 1];
            _htnbearish[i] = _htnbearish[i - 1];
 
            if (_mah.Result[i] < _htn[i - 1] && _mal.Result[i] < _htn[i - 1] && _hh[i - 1] < _htn[i - 1])
            {
                _htn[i] = _hh[i - 1];
 
            }
            if (_mah.Result[i] > _htn[i - 1] && _mal.Result[i] > _htn[i - 1] && _ll[i - 1] > _htn[i - 1])
            {
                _htn[i] = _ll[i - 1];
 
            }
 
 
 
            if (_htn[i] > _htn[i - 1])
            {
                _htnbullish[i] = _htn[i];
                _htnbearish[i] = double.NaN;
            }
            if (_htn[i] < _htn[i - 1])
            {
                _htnbullish[i] = double.NaN;
                _htnbearish[i] = _htn[i];
            }
 
            outHTn[i] = _htn[i];
            outHTnBullish[i] = _htnbullish[i];
            outHTnBearish[i] = _htnbearish[i];
        }
    }
}

Re: DSL (Discontinued Signal Line) indicators

Posted: Sun Feb 19, 2023 10:48 am
by Chickenspicy
Half trend in the flesh

Re: DSL (Discontinued Signal Line) indicators

Posted: Mon Feb 27, 2023 6:54 am
by mrtools
Kalman Filter with All Averages with DSL (levels) Non-linear

This is the non-linear Kalman filter with all the averages that can be used for pre-smoothing the values also with dsl type levels.

Please see here for the Deviation filters version. A PDF has been attached below which describes (in pictures) how a Kalman filter works.

Re: DSL (Discontinued Signal Line) indicators

Posted: Fri Mar 10, 2023 8:29 am
by mrtools
DSL Heiken Ashi (Smoothed) Velocity

This is a dsl of the heiken ashi smoothed velocity, with fill and colored lines on the break of the dsl levels. Lower screenshot non-anchored levels.

PS: If you're new to Anchored & Non-anchored levels, please see: What are Anchored & Non-anchored DSL levels?

Re: DSL (Discontinued Signal Line) indicators

Posted: Sun Mar 26, 2023 8:23 am
by kvak
DSL Volatility Quality indicator

requested file vq with some type of past smoothing value.

Re: DSL (Discontinued Signal Line) indicators

Posted: Sun Mar 26, 2023 9:50 am
by whiplashtm
kvak wrote: Sun Mar 26, 2023 8:23 am requested file vq with some type of past smoothing value.
Image

Image
This is just amazing kvak! Thank you very much. It's way above any expectations so far, incredible!

Re: DSL (Discontinued Signal Line) indicators

Posted: Tue Apr 11, 2023 4:01 am
by kvak
太虚一毫 wrote: Tue Apr 11, 2023 12:18 am This connection is the original version of the Sentiment zone oscillator.

MrTools / KVAK teachers have upgraded this indicator many times and in all directions, and it is extremely perfect. is one of my favorite metrics.

Looking forward to adding the latest (all) averages .
DSL Sentimental Zone Oscillator with E-Averages (MA Filters)

Hello, I made this version for test.... with averages

Re: DSL (Discontinued Signal Line) indicators

Posted: Sat Apr 29, 2023 7:36 am
by rambo
kvak wrote: Thu Jul 28, 2022 8:12 am This is kind of experiment, percentage price oscillator with levels.
Fast and slow price is possibly calculate not only with EMA but list of averages.
MTF, arrows, alerts.
Coloring is possibly not only with levels, but possibly on slope, signal cross or zero level cross.

PS: For those who are new to DSL and looking for information on what it is, please see: What is DSL Discontinued Signal Line?
Image

Image

does this indicator repaint?