Price Action / BreakOut free

by rkokerti in category Trend at 28/01/2013
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.

31602 downloads
How to install
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.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;	
   }
}   
}
Comments