-
Notifications
You must be signed in to change notification settings - Fork 6
/
Comm_Sel_Index.Indicator.CS
45 lines (35 loc) · 1.02 KB
/
Comm_Sel_Index.Indicator.CS
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
using System;
using System.Drawing;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
public class Comm_Sel_Index : IndicatorObject
{
private CSI m_csi1;
private IPlotObject Plot1;
public Comm_Sel_Index(object ctx) :
base(ctx){
length = 14;
mycommission = 25;
mymargin = 1000;
}
[Input]
public double mymargin { get; set; }
[Input]
public double mycommission { get; set; }
[Input]
public int length { get; set; }
protected override void Create(){
m_csi1 = new CSI(this);
Plot1 = AddPlot(new PlotAttributes("CSI", 0, Color.Blue, Color.Empty, 0, 0, true));
}
protected override void StartCalc(){
m_csi1.mymargin = mymargin;
m_csi1.mycommission = mycommission;
m_csi1.length = length;
}
protected override void CalcBar(){
Plot1.Set(0, m_csi1.Value);
}
}
}