Добрый день господа, прикрутите пожалуйста алерты к индикаторам, чтобы при пересечениях выдавал звук сигнальный)
- Код:
declare lower;
input length = 14;
input over_sold = -100;
input over_bought = 100;
def price = close + low + high;
def linDev = lindev(price, length);
plot CCI = if linDev == 0 then 0 else (price - Average(price, length)) / linDev / 0.015;
plot OverBought = over_bought;
plot ZeroLine = 0;
plot OverSold = over_sold;
CCI.setDefaultColor(GetColor(9));
OverBought.setDefaultColor(GetColor(5));
ZeroLine.setDefaultColor(GetColor(5));
OverSold.setDefaultColor(GetColor(5));
AddLabel(CCI>=OverBought, "OverBought");
AddLabel(CCI<=OverSold, "OverSold");
Alert (CCI>=OverBought, "OverBought");
Alert (CCI<=OverSold, "OverSold");
- Код:
# TRIPLECCI
# http://thinkscripter.wordpress.com
# thinkscripter@gmail.com
# Last Update 17 Jan 2008
declare lower;
input length = 50;
input LongLength = 100;
input turboLength = 14;
DEF CCI50 = CCI("length" = length, "over_bought" = 100, "over_sold" = -100);
DEF CCI100 = CCI("length" = longlength, "over_bought" = 100, "over_sold" = -100);
DEF CCI14 = CCI("length" = turboLength, "over_bought" = 100, "over_sold" = -100);
DEF CCIDelta = AbsValue(CCI50 - CCI50[1]);
DEF CCILineColor = if(AbsValue(CCI50) > 200, 8, 5);
plot Long = CCI100;
Long.SetDefaultColor(color.white);
plot CCI = CCI50;
CCI.SetPaintingStrategy(paintingStrategy.HISTOGRAM);
CCI.SetDefaultColor(color.red);
plot Turbo = CCI14;
turbo.SetDefaultColor(color.green);
plot Plus100 = 100;
Plus100.SetDefaultColor(color.green);
plot Minus100 = -100;
Minus100.SetDefaultColor(color.green);
plot Zero = 0;
Zero.SetDefaultColor(color.green);
plot CCILine = CCI50;
CCILine.AssignValueColor(GetColor(CCILineColor));
CCILine.SetLineWeight(2);
- Код:
declare lower;
input price = close;
input stdevLength = 5;
input avgOfStdevLength = 10;
input DYMILength = 30;
input DYMILengthLowerLimit = 3;
input DYMILengthUpperLimit = 30;
assert(DYMILengthLowerLimit > 0, "'dymi length lower limit' must be positive: " + DYMILengthLowerLimit);
assert(DYMILength between DYMILengthLowerLimit and DYMILengthUpperLimit, "'dymi length' must be between lower and upper limit: " + DYMILength);
def std = stdev(price, stdevLength);
def ratio = std / Average(std, avgOfStdevLength);
def dynamicLength = Floor(DYMILength / ratio);
def limitedLength = if dynamicLength between DYMILengthLowerLimit and DYMILengthUpperLimit then dynamicLength else 0;
def sf = 2 / (limitedLength + 1);
def bn = Max(barNumber(), 0);
# 10^-5 precision for ema multiplier
def expIndex = if limitedLength == 0 then 1 else max(1, bn - ceil(-5 / lg(1 - sf)));
def fromIndex = if isNan(expIndex) then 1 else expIndex;
def chg = price - price[1];
def absChg = AbsValue(chg);
def netChgAvg = fold indexN = fromIndex to bn + 1 with accuN do sf * (if isnan(getValue(chg, bn - indexN)) then 0 else getValue(chg, bn - indexN)) + (1 - sf) * accuN;
def totChgAvg = fold indexT = fromIndex to bn + 1 with accuT do sf * (if isnan(getValue(absChg, bn - indexT)) then 0 else getValue(absChg, bn - indexT)) + (1 - sf) * accuT;
def RSI = if totChgAvg != 0 and limitedLength != 0 then 50 * (netChgAvg / totChgAvg + 1) else RSI[1];
plot DYMI = RSI;
plot OverBought = 90;
plot OverSold = 10;
DYMI.DefineColor("OverBought", GetColor(5));
DYMI.DefineColor("Normal", GetColor(7));
DYMI.DefineColor("OverSold", GetColor(1));
DYMI.AssignValueColor(if RSI > overbought then DYMI.Color("OverBought") else if RSI < oversold then DYMI.Color("OverSold") else DYMI.Color("Normal"));
OverBought.SetDefaultColor(GetColor(5));
OverSold.SetDefaultColor(GetColor(5));
Alert (DYMI>=OverBought, "OverBought", Alert.BAR, Sound.ring);
Alert (DYMI<=OverSold, "OverSold", Alert.BAR, Sound.ring);
plot DotDn = if DYMI>=OverBought then high*72 else double.nan;
DotDn.setStyle(curve.POINTS);
DotDn.setPaintingStrategy(paintingStrategy.arROW_DOWN);
DotDn.setLineWeight(3);
DotDn.setDefaultColor(color.wHITE);
plot DotUp = if DYMI<=OverSold then low*-2 else double.nan;
Dotup.setStyle(curve.POINTS);
Dotup.setPaintingStrategy(paintingStrategy.arROW_UP);
Dotup.setLineWeight(3);
Dotup.setDefaultColor(color.wHITE);
alert(Dotup, "Scalper Buy Signal", Alert.BAR, Sound.ring);
alert(DotDn, "Scalper Buy Signal", Alert.BAR, Sound.ring);
Вт Фев 13, 2018 9:35 pm автор Regulest
» Что такое БО?
Вт Фев 13, 2018 5:17 pm автор Vika
» fxnewskiller Внешнее программное обеспечение для торговли на новостях
Вт Фев 13, 2018 5:16 pm автор Vika
» Платные Индикаторы и Стратегии
Вт Фев 13, 2018 5:16 pm автор Vika
» Индикатор для ТОС на разворот тренда
Вт Фев 13, 2018 5:16 pm автор Vika
» У кого есть МТ4 от Альпари с билдом меньше 574 ???
Вт Фев 13, 2018 4:12 pm автор Vika
» алерт на касание к скользящей??
Вт Фев 13, 2018 4:11 pm автор Vika
» BNB Options - брокер бинарных опционов
Пн Фев 12, 2018 9:06 am автор Альбина23
» Бесплатные сигналы для бинарных опционов
Пт Фев 02, 2018 5:14 pm автор Kost2