Skip to content

FibonacciLevel

Summary

Represents the Fibonacci Level.

Signature

1
public abstract interface FibonacciLevel

Namespace

cAlgo.API

Properties

Name Description
PercentLevel { get; set; } Gets or sets the percent level.
IsVisible { get; set; } Defines if the level is visible.

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)
         {
         }
     }
 }

Last update: November 25, 2022

Comments