-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathIsland_Reversal_Up.Indicator.CS
More file actions
47 lines (39 loc) · 1.28 KB
/
Island_Reversal_Up.Indicator.CS
File metadata and controls
47 lines (39 loc) · 1.28 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
47
using System.Drawing;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
[SameAsSymbol(true)]
public class Island_Reversal_Up : IndicatorObject
{
private IPlotObject Plot1;
public Island_Reversal_Up(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("IslandUp", EPlotShapes.Point,
Color.Yellow, Color.Empty, 4,
0,
true));
}
protected override void StartCalc(){
}
protected override void CalcBar(){
if ((PublicFunctions.DoubleLess(Bars.High[0], Bars.Low.Lowest(length, 1)) &&
PublicFunctions.DoubleGreater(Bars.Close[0], (Bars.High[0]
- (Bars.Range()*(pctrange*0.01)))))){
Plot1.Set(0, Bars.Low[0]);
Alerts.Alert();
}
else{
Plot1.Reset();
}
}
}
}