Description
Okay now it's my turn to contribute to the community.
This is a simple Inside Bar pattern recognition. The points appear around the Mother Bar, at the opening of the third bar after the Mother bar.
There is an inside bar when a bar (child) does not violate the precedent bar (mother). This pattern is useful for trend inversions. Do not use every signal, only those at the structures (supports, resistances) are important.
More informations about the Inside Bar Pattern: http://www.dailyfx.com/forex/education/trading_tips/chart_of_the_day/2012/02/22/Inside_Bars_and_How_to_trade_them.html
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
public class InsideBarPatternRecognition : Indicator
{
[Output("Up Point", Color = Colors.Orange, PlotType = PlotType.Points, Thickness = 5)]
public IndicatorDataSeries UpPoint { get; set; }
[Output("Down Point", Color = Colors.Orange, PlotType = PlotType.Points, Thickness = 5)]
public IndicatorDataSeries DownPoint { get; set; }
public override void Calculate(int index)
{
var motherCandleHigh = MarketSeries.High.Last(2);
var motherCandleLow = MarketSeries.Low.Last(2);
var motherCandleOpen = MarketSeries.Open.Last(2);
var motherCandleClose = MarketSeries.Close.Last(2);
var childCandleHigh = MarketSeries.High.Last(1);
var childCandleLow = MarketSeries.Low.Last(1);
var childCandleOpen = MarketSeries.Open.Last(1);
var childCandleClose = MarketSeries.Close.Last(1);
if (childCandleHigh < motherCandleHigh && childCandleLow > motherCandleLow && Math.Abs(motherCandleOpen - motherCandleClose) > Math.Abs(childCandleOpen - childCandleClose))
DrawPoint(index);
}
// Draws a point next to the parent bar
private void DrawPoint(int index)
{
UpPoint[index - 2] = MarketSeries.High[index - 2] + 0.0005;
DownPoint[index - 2] = MarketSeries.Low[index - 2] - 0.0005;
}
}
}
Vlad_Wulf
Joined on 23.06.2015
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: InsideBar Pattern Recognition.algo
- Rating: 0
- Installs: 5737
- Modified: 13/10/2021 09:54
Comments
A recognition indicator is a technical indicator that automatically identifies various candlestick patterns. wood floor scratch repair
Hi, Its work for me this pattern is useful for trend inversions. Well is there anyone know best online marketing agency in Atlanta?
Your provided code is not working, I have tried several times but all the time it gave me irrelevant code error. I do not know but it happened. But thanks to online assignment help company, they provided me the accurate code and save my life.
Is it possible to get notified by email when an inside bar is formed?
Thank you
Pattern Recognition Indicator is a useful forex tool that identifies forex candlestick patterns on your charts as they form. NJ construction company