Description
Relative Strength Index (Bar Color Base)
Relative Strength Index (Bar Color Based) Is A Visual Chart Interface Rather Than RSI Being a Segregated oscillator indicator Which Would normally be displayed Below the chart. Relative Strength Index (Bar Color Base) Indicator Overlays the OverBought and the Oversold Levels(Parameters that you can Manipulate, as well OHLC). This Indicator Works best with others Indicators. OverBought and the Oversold Levels Are changed with Bar Color Distinction.
.
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 Yo : Indicator
{
[Parameter("Periods", DefaultValue = 337)]
public int perid { get; set; }
[Parameter("OHLC ")]
public DataSeries Source { get; set; }
[Parameter(DefaultValue = 70)]
public int MaxLevel { get; set; }
[Parameter(DefaultValue = 30)]
public int MinLevel { get; set; }
protected override void Initialize()
{
var vma = Indicators.RelativeStrengthIndex(Source, perid);
}
public override void Calculate(int index)
{
var Price = Source;
var vma = Indicators.RelativeStrengthIndex(Source, perid);
if (vma.Result.LastValue > MaxLevel)
{
Chart.SetBarColor(Price.Count, Color.FromHex("#00868A"));
}
if (vma.Result.LastValue < MinLevel)
{
Chart.SetBarColor(Price.Count, Color.FromHex("#D19292"));
}
return;
}
}
}
Fron
Joined on 08.01.2020
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: RelativeStrengthIndex(Bar Color Base).algo
- Rating: 0
- Installs: 1724
- Modified: 10/07/2022 23:42
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.
A good one for scalping. By the way, please advise how to change the color? Thanks