-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCustom_ShowMe.Indicator.CS
More file actions
32 lines (28 loc) · 894 Bytes
/
Custom_ShowMe.Indicator.CS
File metadata and controls
32 lines (28 loc) · 894 Bytes
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
using System;
using System.Drawing;
namespace PowerLanguage.Indicator
{
public class Custom_ShowMe : IndicatorObject
{
private IPlotObject Plot1;
public Custom_ShowMe(object ctx) :
base(ctx) {}
protected override void Create(){
Plot1 =
AddPlot(new PlotAttributes("CustomSM", EPlotShapes.Point,
Color.Cyan, Color.Empty, 4, 0,
true));
}
protected override void CalcBar(){
if (PublicFunctions.DoubleLess(Bars.High[0], Bars.High[1]) &&
PublicFunctions.DoubleGreater(Bars.Low[0], Bars.Low[1]))
{
Plot1.Set(0, Bars.CloseValue);
Alerts.Alert();
}
else{
Plot1.Reset();
}
}
}
}