Category Trend  at 16/12/2021

PAC (Price Action Channel)

Description

THE PRICE ACTION CHANNEL IS MY FAVOURITE INDICATOR; I CALL THIS "RED LIGHT, GREEN LIGHT".

WHEN THE PRICE CLOSED ABOVE THE PAC THAT IS A GREEN LIGHT. CONVERSELY, WHEN THE PRICE CLOSED BELLOW THE PAC IS A RED LIGHT. 


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

namespace cAlgo
{
    [Cloud("Bluelow", "Bluehigh")]
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class PAC : Indicator
    {

        [Parameter("Period", DefaultValue = 9)]
        public int Period { get; set; }

        [Parameter("Shift", DefaultValue = 1, MinValue = -100, MaxValue = 500)]
        public int Shift { get; set; }

        [Parameter("MA Type", DefaultValue = MovingAverageType.Exponential)]
        public MovingAverageType MAType { get; set; }


        [Output("Bluelow", LineColor = "#0071C1")]
        public IndicatorDataSeries BlueLower { get; set; }

        [Output("Bluehigh", LineColor = "#0071C1")]
        public IndicatorDataSeries BlueUpper { get; set; }


        private MovingAverage high;
        private MovingAverage low;
        protected override void Initialize()
        {
            high = Indicators.MovingAverage(Bars.HighPrices, Period, MAType);
            low = Indicators.MovingAverage(Bars.LowPrices, Period, MAType);
        }

        public override void Calculate(int index)
        {

            BlueUpper[index + Shift] = high.Result[index];
            BlueLower[index + Shift] = low.Result[index];

        }

    }
}


TR
traderfxmaster007

Joined 09.07.2019

  • Type: Free
  • Language: C#
  • Trading Platform: cTrader Automate
  • Filename: PAC.algo
  • Rating: 0
  • Installs: 1647
Comments
Only logged in users can post a comment
NG
NgacCatrxkhdpvd746 · 9 months ago

It's good to know a few more ways to code here.

fnaf security breach

GM
gmkenneyy · 1 year ago

Hello,

Thanks for uploading the source code for your PAC.

1. May i ask what the Red line is? It seems best to use it in conjunction with the PAC you uploaded.  

2. What chart timeframe does the PAC work best on. I'm guessing its the H4?

Regards

Kenneth