Description
using cAlgo.API;
namespace cAlgo
{
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class DeMarkPivotPoints : Indicator
{
[Parameter("Source")]
public DataSeries Source { get; set; }
[Output("Pivot", Color = Colors.Blue)]
public IndicatorDataSeries Pivot { get; set; }
[Output("R1", Color = Colors.Red)]
public IndicatorDataSeries R1 { get; set; }
[Output("S1", Color = Colors.Green)]
public IndicatorDataSeries S1 { get; set; }
protected override void Initialize()
{
CalculatePivotPoints();
}
public override void Calculate(int index)
{
CalculatePivotPoints();
}
private void CalculatePivotPoints()
{
double previousClose = Source[1];
double highest = MarketSeries.High.Maximum(5);
double lowest = MarketSeries.Low.Minimum(5);
Pivot[0] = (previousClose + highest + lowest + Source[0]) / 4;
R1[0] = (2 * Pivot[0]) - lowest;
S1[0] = (2 * Pivot[0]) - highest;
}
}
}
u
IR
irfpm20
Joined on 04.04.2024
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: ADXR.algo
- Rating: 0
- Installs: 368
- Modified: 04/04/2024 12:24
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.
No comments found.