Skip to content

FibonacciLevel

Summary

Represents the Fibonacci Level.

Signature

1
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.Percent);
                 if (level.Percent > 62) level.IsVisible = false;
             }
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Properties

Percent

Summary

Gets or sets the level percent.

Signature

1
public abstract double Percent {get; set;}

Return Value

double

Time

Summary

Gets or sets the level time.

Signature

1
public abstract DateTime? Time {get; set;}

Return Value

DateTime?

Price

Summary

Gets or sets the level price.

Signature

1
public abstract double? Price {get; set;}

Return Value

double?

IsVisible

Summary

Defines if the level is visible.

Signature

1
public abstract bool IsVisible {get; set;}

Return Value

bool