Re: DSL (Discontinued Signal Line) indicators

#691
太虚一毫 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

#692
If coders can convert, there is source code for non repaint half trend for cTrader, if can be converted
No spam,, hacking,, slandering,, source code,, fake identity,, zero-contribution,, unauthorized sales,, zero-feedback
(also see Respectful Requests)
(͡o‿O͡)
Only two things matter in life, 1 what you believe & 2 how you treat others.
0+0=0, infinity/infinity=1
The wages of sin is death and gift of God is eternal life through Jesus Christ
🗿it’s new work not hard work

Re: DSL (Discontinued Signal Line) indicators

#693

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];
        }
    }
}
No spam,, hacking,, slandering,, source code,, fake identity,, zero-contribution,, unauthorized sales,, zero-feedback
(also see Respectful Requests)
(͡o‿O͡)
Only two things matter in life, 1 what you believe & 2 how you treat others.
0+0=0, infinity/infinity=1
The wages of sin is death and gift of God is eternal life through Jesus Christ
🗿it’s new work not hard work

Re: DSL (Discontinued Signal Line) indicators

#694
Half trend in the flesh
HalfTrend Histo ahtf.mq4
(19 KiB) Downloaded 150 times
HalfTrend MTF with Channels ahtf_ribbon.mq4
(22.45 KiB) Downloaded 166 times
FD3D0AF4-E3A8-4221-9655-8F7BA0DBEF1E.png
No spam,, hacking,, slandering,, source code,, fake identity,, zero-contribution,, unauthorized sales,, zero-feedback
(also see Respectful Requests)
(͡o‿O͡)
Only two things matter in life, 1 what you believe & 2 how you treat others.
0+0=0, infinity/infinity=1
The wages of sin is death and gift of God is eternal life through Jesus Christ
🗿it’s new work not hard work

Re: DSL (Discontinued Signal Line) indicators

#695
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.
EURJPYM15.png
nonlinear kalman filter avgs (levels).ex4
(281.93 KiB) Downloaded 260 times
How a Kalman filter works, in pictures.pdf
(1.58 MiB) Downloaded 246 times


Re: DSL (Discontinued Signal Line) indicators

#699
太虚一毫 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
explorer_FP8p8Xh0kN.png
DSL SZO (eAverages).ex4
(333.52 KiB) Downloaded 151 times

Re: DSL (Discontinued Signal Line) indicators

#700
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?


Users viewing this forum: alextschem, Bing [Bot], CommonCrawl [Bot], DotNetDotCom [Bot], IBM oBot [Bot], [email protected], Jedidiah, naluvs01, Yandex [Bot] and 154 guests