-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathIsland_Reversal_Dn.Indicator.CS
More file actions
46 lines (38 loc) · 1.23 KB
/
Island_Reversal_Dn.Indicator.CS
File metadata and controls
46 lines (38 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Drawing;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
[SameAsSymbol(true)]
public class Island_Reversal_Dn : IndicatorObject
{
private IPlotObject Plot1;
public Island_Reversal_Dn(object ctx) :
base(ctx){
pctrange = 30;
length = 4;
}
[Input]
public int length { get; set; }
[Input]
public double pctrange { get; set; }
protected override void Create(){
Plot1 =
AddPlot(new PlotAttributes("IslandDn", EPlotShapes.Point,
Color.Blue, Color.Empty, 4, 0,
true));
}
protected override void StartCalc(){
}
protected override void CalcBar(){
if ((PublicFunctions.DoubleGreater(Bars.Low[0], Bars.High.Highest(length, 1)) &&
PublicFunctions.DoubleLess(Bars.Close[0], Bars.Low[0]
+ Bars.Range()*(pctrange*0.01)))){
Plot1.Set(0, Bars.High[0]);
Alerts.Alert();
}
else{
Plot1.Reset();
}
}
}
}