Description
NOW CHOOSE FROM 8 DIFFERENT TYPES OF MOVING AVERAGES
-IMPROVE!! THE VISUAL VIEW OF MA'S
-COLOR WILL CHANGE WHEN ABOVE OR BELOW MA
-PARAMETERS WOULD TAKE (OHLC),PERIODS,MA TYPE
-IF YOU ONLY USE Exponential Moving Average HERE is the link (CLICK HERE)
GET YOUR MERCH AT VIVAPEIRO.COM
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
[Parameter("Periods", DefaultValue = 9)]
public int perid { get; set; }
[Parameter("Source Price")]
public DataSeries Source { get; set; }
[Parameter("MA Type", DefaultValue = MovingAverageType.Exponential)]
public MovingAverageType MA { get; set; }
protected override void Initialize()
{
}
public override void Calculate(int index)
{
var vma = Indicators.MovingAverage(Source, perid, MA);
for (var i = 0; i < Bars.Count; i++)
{
var Price = Source[i];
var Value = vma.Result[i];
var barColor = Price > Value ? Color.FromHex("#00868A") : Color.FromHex("#D19292");
Chart.SetBarColor(i, barColor);
}
}
}
}
Fron
Joined on 08.01.2020
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: VivaGlimpse1.1.algo
- Rating: 5
- Installs: 1667
- Modified: 13/10/2021 09:55
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.