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 on 09.07.2019
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: PAC.algo
- Rating: 0
- Installs: 2053
- Modified: 16/12/2021 20:19
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
GM
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
It's good to know a few more ways to code here.
fnaf security breach