FibonacciLevel
Summary
Represents the Fibonacci Level.
Signature
| public abstract interface FibonacciLevel
|
Namespace
cAlgo.API
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 | using cAlgo.API;
namespace cAlgo
{
// This sample shows how to use a chart Fibonacci Retracement levels property to modify the fibonacci levels
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class FibonacciLevelSample : Indicator
{
protected override void Initialize()
{
var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;
var max = Bars.HighPrices.Maximum(period);
var min = Bars.LowPrices.Minimum(period);
var fibonacciRetracement = Chart.DrawFibonacciRetracement("FibonacciRetracement", Chart.FirstVisibleBarIndex, max, Chart.LastVisibleBarIndex, min, Color.Red);
foreach (var level in fibonacciRetracement.FibonacciLevels)
{
Print(level.PercentLevel);
if (level.PercentLevel > 62) level.IsVisible = false;
}
}
public override void Calculate(int index)
{
}
}
}
|
Properties
PercentLevel
Summary
Gets or sets the percent level.
Signature
| public abstract double PercentLevel {get; set;}
|
Return Value
double
IsVisible
Summary
Defines if the level is visible.
Signature
| public abstract bool IsVisible {get; set;}
|
Return Value
bool
Last update: September 29, 2023