top trade free

by danielpintoadv in category Trend at 17/07/2022
Description

<font style="vertical-align: inherit;"><font style="vertical-align: inherit;">usando Sistema;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

usando cAlgo.API;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

usando cAlgo.API.Internals;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

usando cAlgo.API.Indicators;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

usando cAlgo.Indicators;</font></font><font></font>

<font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

namespacecAlgo</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

{</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

    classe pública UTBOT : Indicador</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

    {</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        [Parameter("Chave", DefaultValue = 1)]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        valor-chave publicdouble{ get; </font><font style="vertical-align: inherit;">definir; </font><font style="vertical-align: inherit;">}</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        [Parameter("Período ATR", DefaultValue = 10)]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        publicintatrperiod { get; </font><font style="vertical-align: inherit;">definir; </font><font style="vertical-align: inherit;">}</font></font><font></font>

<font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        privado AverageTrueRange xATR;</font></font><font></font>

<font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        [Output("UpTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Green")]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        publicIndicatorDataSeries XATRTrailingStopGreen { get; </font><font style="vertical-align: inherit;">definir; </font><font style="vertical-align: inherit;">}</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        [Output("Contínuos", PlotType = PlotType.DiscontinuousLine, LineColor = "Verde")]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        publicIndicatorDataSeries XATRTrailingStop { get; </font><font style="vertical-align: inherit;">definir; </font><font style="vertical-align: inherit;">}</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        [Output("DownTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Red")]</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        publicIndicatorDataSeries XATRTrailingStopRed { get; </font><font style="vertical-align: inherit;">definir; </font><font style="vertical-align: inherit;">}</font></font><font></font>

<font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        substituição protegida voidInitialize()</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        {</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

            xATR = Indicators.AverageTrueRange(atrperiod, MovingAverageType.Exponential);</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        }</font></font><font></font>

<font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        substituição pública voidCalcular(intindex)</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        {</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

            doublenLoss = valor-chave * xATR.Result[index];</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

            XATRTrailingStop[index] = (MarketSeries.Close[index] > XATRTrailingStop[index - 1] && MarketSeries.Close[index - 1] > XARTrailingStop[index - 1]) ? </font><font style="vertical-align: inherit;">Math.Max(XATRTrailingStop[index - 1], MarketSeries.Close[index] - nLoss) : (MarketSeries.Close[index] < XATRTrailingStop[index - 1] && MarketSeries.Close[index - 1] < XATRTrailingStop[index - 1 ]) ? </font><font style="vertical-align: inherit;">Math.Min(XATRTrailingStop[index - 1], MarketSeries.Close[index] + nLoss) : (MarketSeries.Close[index] > XARTrailingStop[index - 1]) ? </font><font style="vertical-align: inherit;">MarketSeries.Close[index] - nLoss : MarketSeries.Close[index] + nLoss;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

            XATRTrailingStopGreen[índice] = XATRTrailingStop[índice] < MarketSeries.Close[índice] ? </font><font style="vertical-align: inherit;">XATRTrailingStop[índice] : double.NaN;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

            XATRTrailingStopRed[índice] = XATRTrailingStop[índice] > MarketSeries.Close[índice] ? </font><font style="vertical-align: inherit;">XATRTrailingStop[índice] : double.NaN;</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

        }</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

    }</font></font><font></font><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">

}</font></font><font></font>

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
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 UTBOT : Indicator
    {
        [Parameter("Key", DefaultValue = 1)]
        public double keyvalue { get; set; }
        [Parameter("ATR Period", DefaultValue = 10)]
        public int atrperiod { get; set; }

        private AverageTrueRange xATR;

        [Output("UpTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Green")]
        public IndicatorDataSeries XATRTrailingStopGreen { get; set; }
        [Output("Continuos", PlotType = PlotType.DiscontinuousLine, LineColor = "Green")]
        public IndicatorDataSeries XATRTrailingStop { get; set; }
        [Output("DownTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Red")]
        public IndicatorDataSeries XATRTrailingStopRed { get; set; }

        protected override void Initialize()
        {
            xATR = Indicators.AverageTrueRange(atrperiod, MovingAverageType.Exponential);
        }

        public override void Calculate(int index)
        {
            double nLoss = keyvalue * xATR.Result[index];
            XATRTrailingStop[index] = (MarketSeries.Close[index] > XATRTrailingStop[index - 1] && MarketSeries.Close[index - 1] > XATRTrailingStop[index - 1]) ? Math.Max(XATRTrailingStop[index - 1], MarketSeries.Close[index] - nLoss) : (MarketSeries.Close[index] < XATRTrailingStop[index - 1] && MarketSeries.Close[index - 1] < XATRTrailingStop[index - 1]) ? Math.Min(XATRTrailingStop[index - 1], MarketSeries.Close[index] + nLoss) : (MarketSeries.Close[index] > XATRTrailingStop[index - 1]) ? MarketSeries.Close[index] - nLoss : MarketSeries.Close[index] + nLoss;
            XATRTrailingStopGreen[index] = XATRTrailingStop[index] < MarketSeries.Close[index] ? XATRTrailingStop[index] : double.NaN;
            XATRTrailingStopRed[index] = XATRTrailingStop[index] > MarketSeries.Close[index] ? XATRTrailingStop[index] : double.NaN;
        }
    }
}
Comments

rob.p.marshall - July 18, 2022 @ 09:44

Explanation on what this does please?

halenabob - July 18, 2022 @ 12:34

It's great for all the traders and you define all the major parts of the top trade. But we also live life as a student and we work for performing the help our students when they are stressed about their assignments and essays that's a reason for sharing the nursing dissertation writing service they are doing for all works the helping students.

matheuscabralkk - July 19, 2022 @ 05:26

escreva em português por favor, teu inglês é muito ruim

joeneeley0920 - August 01, 2022 @ 11:56

This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post. run 3

charlessyarborough - August 29, 2022 @ 19:38

If you're looking for a durable, long-lasting, and all-around top trade then this is the one for you. With a beautiful color, sturdy construction, and take my classes for me, this will last for years to come. You'll be able to keep your items on top and be able to grab them easily.

strongv364 - August 30, 2022 @ 11:10

Thanks to your writing, I now find the posed problem to be engaging. I'm sure I'm not the only one who has an interest in them. In what time frame could I expect to see this article finished? I really appreciate the high standard of the articles you post. For sure, this article will shock a lot of people when they read it, and that's the point! The post is appreciated. the backrooms

junealexis001 - September 12, 2022 @ 12:03

Interesting  site i love it keep posting more!   https://fencingtulsa.com

thomassrichard46 - September 15, 2022 @ 12:33

An expert in the art of writing, an author has crafted a guide to help the average person improve their writing skills. The author discusses how to improve book writing expert grammar, punctuation, and style, while also offering writing exercises that can be completed at home. 

Johnklein - November 20, 2022 @ 20:10

Chose to play the best slots at vulkan vegas casino (https://vulkanvegas-102.com/ru). It seems to be able to win a lot. And you can play in this gambling club not only for fun, but also to earn money. Already got my friends all the gambling. I recommend to come here!

samwaters1307 - November 21, 2022 @ 05:37

I'll have to follow you since the information you present is really real, reflecting correctly and objectively, and it's quite useful for society to grow together. fnaf

0