ST
Topics
03 Feb 2018, 20:36
1884
2
12 Jul 2017, 15:22
3950
3
06 Jul 2017, 18:58
4421
1
11 Jun 2017, 19:01
0
3913
3
11 Jun 2017, 16:38
8
856
2
Replies
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
07 Jul 2017, 23:03
RE:
Thank you!
croucrou said:
@Storm31