Topics
03 Feb 2018, 20:36
 1914
 2
11 Jun 2017, 16:38
 8
 874
 2
Replies

Storm31
07 Jul 2017, 23:03

RE:

Thank you!

 

 

croucrou said:

using System;

using cAlgo.API;

using cAlgo.API.Indicators;

 

namespace cAlgo.Indicators

{

    [Indicator(IsOverlay = true)]

    public class CandleSize : Indicator

    {

        public override void Calculate(int index)

        {

            double candleSize = Math.Abs(MarketSeries.Low[index] - MarketSeries.High[index]);

            double candleSizePips = Math.Round(candleSize / Symbol.PipSize, 3);

         

            ChartObjects.DrawText(

                index.ToString(), candleSizePips.ToString(),  // object name and text

                index, MarketSeries.High[index],  // location

                VerticalAlignment.Top, HorizontalAlignment.Center);

        }

    }

}

 

 


@Storm31

Storm31
06 Jul 2017, 18:20

RE: Pip Count Code

Hi Seba

 

I know it was a few years back that you posted this code for a very helpful indicator, thank you. Could you please help with a small change to the code so that the pip count shows the entire range of the candle from high to low? I believe now that it cclculates only the body.

Thanks in advance for your help.

Kind regards

 

seba said:

jeex said:

Does anyone have an algorithm for determining a doji, i.e. a long wick with practicaly no body?
 

You mean something like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class Doji : Indicator
    {
        [Parameter(DefaultValue = 99.99, MinValue = 99, MaxValue = 100)]
        public double Percentage { get; set; }

        [Output("Main", PlotType = PlotType.Points, Color = Colors.Black, Thickness = 1)]
        public IndicatorDataSeries Result { get; set; }


        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            if (Math.Min(MarketSeries.Open[index], MarketSeries.Close[index]) >= (Percentage / 100) * Math.Max(MarketSeries.Open[index], MarketSeries.Close[index]))
            {
                Result[index] = MarketSeries.Low[index] * 0.9995;
                string o = string.Format("doji{0}", index);
                ChartObjects.DrawText(o, " ˄\r\nDoji", index, Result[index], VerticalAlignment.Center, HorizontalAlignment.Center, Colors.Green);
            }
        }
    }
}

 


@Storm31

Storm31
11 Jun 2017, 19:42

RE:

Many thanks Paul for your swift and excellent suggestion, it may just be what I am looking for. Thanks again.

 


@Storm31

Storm31
02 Feb 2017, 17:23

A default scaling out feature that can be preset BEFORE a trade is placed is essential for many scalpers. The current Advanced Take Profit can only be applied AFTER a trade has been placed.


@Storm31