Category Trend  at 10/10/2014

Price Action / BreakOut

Description

This is a Price Action Indicator, that helps you to identify the difference between trend / sideway market. Unlike Highest High Lowest Low indicator, here you don't need to set period. It adapts to the market, based on the logic of inside bars.

 

Buy, when price is above EMA and breaks up from the consolidation channel.

Sell, when price is below EMA and breaks down from the consolidation channel.


using System;
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true)]
    public class Break_Out_Channel : Indicator
    {
//-----------------------------------------------------------------     
    [Output("Up", Color = Colors.DarkCyan, PlotType = PlotType.Line, LineStyle = LineStyle.LinesDots, Thickness = 1)]
    public IndicatorDataSeries Up { get; set; }
    
    [Output("Down", Color = Colors.DarkCyan, PlotType = PlotType.Line, LineStyle = LineStyle.LinesDots, Thickness = 1)]
    public IndicatorDataSeries Down { get; set; } 

    [Output("Mid", Color = Colors.DarkViolet, PlotType = PlotType.Line, LineStyle = LineStyle.LinesDots, Thickness = 1)]
    public IndicatorDataSeries Mid { get; set; }
//----------------------------------------------------------------- 
    public override void Calculate(int index)
    {
	
	if(index < 5)
	return;

    if(MarketSeries.Close[index] < Up[index-1] & MarketSeries.Close[index] > Down[index-1])
    {
    Up[index] = Up[index-1];
    Down[index] = Down[index-1];    
    }
    else
    {
    Up[index] = MarketSeries.High[index];
    Down[index] = MarketSeries.Low[index];    
    }

	Mid[index] = (Up[index] + Down[index])/2;	
   }
}   
}


RK
rkokerti

Joined 28.06.2012

  • Type: Free
  • Language: C#
  • Trading Platform: cTrader Automate
  • Filename: Break_Out_Channel.algo
  • Rating: 5
  • Installs: 39833
Comments
Only logged in users can post a comment
DA
DaniloBezerra · 4 years ago

Does not install on C-trader, likely file with problems, can solve?

DE
deansi · 9 years ago

It works ok for me

RK
rkokerti · 9 years ago

Hi,

I don't know why source code disappeared, but I uploaded again.

RA
raphaelcarlot · 9 years ago

Hi.

Can't download your indicator. I receive 404 error.  Did You removed it.

Can You help me to get Your indicator Price Action / Break Out

 

MA
MasterBo · 9 years ago

Hi.

Can't download your indicator. I receive 404 error.  Did You removed it.

Can You help me to get Your indicator Price Action / Break Out

AL
allo · 9 years ago

Hi, I don't know how to install it. It says it's a .cs file and can't open it when I try to install it once downloaded.

thanks, Sylvie