Вот код с их сайта
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
#VM_DaylyOHLCLevels
#By GroWeX
#
http://www.moneyclass.ru
InputShowTodayOnly=yes;
defday=getDay();
deflastDay=getLastDay();
defisToday=day==lastDay;
defTodayOpen=Open(period=aggregationPeriod.DAY);
defYtdHigh=High(period=aggregationPeriod.DAY)[1];
defYtdLow=Low(period=aggregationPeriod.DAY)[1];
defYtdOpen=Open(period=aggregationPeriod.DAY)[1];
defYtdClose=Close(period=aggregationPeriod.DAY)[1];
plot oline=If(!ShowTodayOnly and(IsNaN(close[-1])),YtdOpen,If(isToday and(!IsNaN(close)),YtdOpen,Double.NaN));
plot cline=If(!ShowTodayOnly and(IsNaN(close[-1])),YtdClose,If(istoday and(!IsNaN(close)),YtdClose,Double.NaN));
plot hline=If(!ShowTodayOnly and(IsNaN(close[-1])),YtdHigh,If(istoday and(!IsNaN(close)),YtdHigh,Double.NaN));
plot lowline=If(!ShowTodayOnly and(IsNaN(close[-1])),YtdLow,If(istoday and(!IsNaN(close)),YtdLow,Double.NaN));
plot opline=If(IsNaN(close[-1]),TodayOpen,If(istoday and(!IsNaN(close)),TodayOpen,Double.NaN));
oline.setPaintingStrategy(paintingStrategy.HORIZONTAL);
cline.setPaintingStrategy(paintingStrategy.HORIZONTAL);
hline.setPaintingStrategy(paintingStrategy.HORIZONTAL);
lowline.setPaintingStrategy(paintingStrategy.HORIZONTAL);
opline.setPaintingStrategy(paintingStrategy.HORIZONTAL);
oline.SetDefaultColor(color.cyan);
cline.SetDefaultColor(color.blue);
hline.SetDefaultColor(color.yellow);
lowline.SetDefaultColor(color.red);
opline.SetDefaultColor(color.orange);
hline.setLineWeight(3);
lowline.setLineWeight(3);
oline.setLineWeight(3);
cline.setLineWeight(3);
opline.setLineWeight(3);
- See more at:
http://www.moneyclass.ru/индикатор-dailyohlc_levels/#sthash.RPBXhSQS.dpuf