Выложу свой индикатор

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
Просьба потестить покрутить свои настройки и сказать свое мнение может кто потскажет свой фильтр индюк написал kikos по прозьбе.

сам индюк

#KIKOS
#DYMI MQ PC HO CCI
#10.09.2015
input price = close;
input stdevLength = 5;
input avgOfStdevLength = 23;
input DYMILength = 11;
input DYMILengthLowerLimit = 3;
input DYMILengthUpperLimit = 60;
input Over_Bought = 90;
input Over_sold = 10;
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];

def DYMI = RSI;
def OverBought = Over_Bought;
def OverSold = Over_sold;
def centr1 = 50;
def centr2 = 50;
#####################################################################

input NumBars = 5;
input scalingMultiplier = 0.2;
input valueLevel = 6.0;


def VarNumBars = if NumBars < 5 then 5 else if NumBars > 1000 then 1000 else NumBars;
def VarP = Round(VarNumBars / 5.0, 0);

def TLow = if close < low[1] then close else low[1];
def THigh = if close > high[1] then close else high[1];

def VarA = if VarP == 1 then THigh - TLow else Highest(high, VarP) - Lowest(low, VarP);
def VarTotal = if VarP == 1 then Sum(VarA, VarNumBars) else Sum(VarA, VarNumBars);
def VarCount = VarNumBars;

def LRange = (VarTotal / VarCount) * scalingMultiplier;

def VLup = Average(hl2, VarNumBars) + ((LRange) * valueLevel);

def VLdown = Average(hl2, VarNumBars) - ((LRange) * valueLevel);



#####################################################################
def UpD = if DYMI crosses below OverSold and price < VLdown then 1 else 0;

def DownD = if DYMI crosses above OverBought and price > VLup then 1 else 0;

################ PC #############
input displace = 0;
input length = 20;

def LowerBand = Lowest(low[-displace + 1], length);

def UpperBand = Highest(high[-displace + 1], length);

def upP = if close < LowerBand and close[1] > LowerBand[1] then 1 else 0;
def downP = if close > UpperBand and close[1] < UpperBand[1] then 1 else 0;

########### HO ##############

input priceH = hl2;
input lengthH = 10;
input OuterValue = 0.03;

def displacement = (-lengthH / 2) + 1;
def dPrice = priceH[displacement];

rec CMA = if !IsNaN(dPrice) then Average(dPrice, AbsValue(lengthH)) else CMA[1] + (CMA[1] - CMA[2]);

def OscValue =
if high >= high[1] and low <= low[1]
then
if close >= close[1] # high >= high[2]
then high
else low
else
if high > high[1]
then high
else
if low < low[1]
then low
else
if close > close[1]
then high
else
if close < close[1]
then low
else (high + low) / 2;


def HurstOsc = (100 * OscValue / CMA) - 100;

def CenterLine = 0;
def UpperOuterBand = OuterValue;
def LowerOuterBand = - OuterValue;

def upH = HurstOsc < - OuterValue;
def downH = HurstOsc > OuterValue;

########## CCI ###########

input lengthC = 14;
input over_soldC = -200;
input over_boughtC = 200;

def priceC = close + low + high;
def linDev = LinDev(priceC, lengthC);
def CCI = if linDev == 0 then 0 else (priceC - Average(priceC, lengthC)) / linDev / 0.015;
def OverBoughtC = over_boughtC;
def ZeroLine = 0;
def OverSoldC = over_soldC;

def upc = if CCI < OverSoldC then 1 else 0;
def downc = if CCI > OverBoughtC then 1 else 0;

########### PLOT ARROW ############

plot up = if upD and upP and upH and upC then 1 else 0;
plot down = if downD and downP and downH and downC then 1 else 0;

up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
up.SetLineWeight(5);
up.SetDefaultColor(Color.WHITE);
Alert (up, "UP", Alert.BAR, Sound.Ring);

down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
down.SetLineWeight(5);
down.SetDefaultColor(Color.WHITE);
Alert(down, "DOWN", Alert.BAR, Sound.Ring);

AddLabel(Down, "$", Color.RED);
AddLabel(up, "$", Color.GREEN);

### END ############


##########---------------------------TEST OPTIONS---------------------------------------------
#hint timetest: Test according to timeperiods
#hint expiry: Numbers of candles after signal (1 = next candle after signal, 2 = second candle)
#hint secondcandle: Use only if candleexpiry = 1. Adding signals taking second candle after loss
#hint moneycount: display labels with profit/loss in $
#hint invest: amount of investment per trade
#hint RPI: Return Per Investment (payout)


input expiry = 1;
input secondcandle = no;
input moneycount = no;
input invest = 25;
input RPI = 0.80;
input timetest = no;

########-------------------------------------------TIME FILTER-----------------------------------------------
#hint TradingOpen1: EST NY TIME
input TradingOpen1 = 330;
input TradingClose1 = 530;
input TradingOpen2 = 0930;
input TradingClose2 = 1130;

#hint input AsiaOpenTime1 = 2000;
#hint input AsiaCloseTime1 = 2359;
#hint input AsiaOpenTime2 = 0000;
#hint input AsiaCloseTime2 = 0200;
#hint input EUOpenTime = 330;
#hint input EUCloseTime = 530;
#hint input USOpenTime = 0930;
#hint input USCloseTime = 1130;

# Set below to 'True' to allow for DST difference adjustment if you are setting
# windows up for a european instrument like the euro.
input EnableDSTAutoAdjust = {default "Yes", "No"};
input DSTOffsetHours = 1;

#==========================================================================
# Figure out DST adjustment for diffence between USA and europe
#==========================================================================
#basically, if we are after the 2nd Sunday in March and before
#the last Sunday in March, we need to offset the Trading Windows by 1hr forward
#if we are after the last Sunday in Oct, until the 1st Sunday in Nov
# we need to offset the trading windows by 1hr backward...
def CurrentYear = GetYear();
def CurrentMonth = GetMonth();
def CurrentDOM = GetDayOfMonth(GetYYYYMMDD());

#What is the first day of the week for the 1st of this month?
def Day1DOW1 = GetDayOfWeek(CurrentYear * 10000 + CurrentMonth * 100 + 1);
def FirstSundayDOM1 = if Day1DOW1 < 7
then 7 - Day1DOW1 + 1
else 1;

def SecondSundayOfMonth = FirstSundayDOM1 + 7;
def isMarch = If (CurrentMonth == 3, 1, 0);
def SpringDSTShiftStart = If (isMarch and (SecondSundayOfMonth <= CurrentDOM), 1, 0);

#last sunday in march...
def SpringDSTShiftStop = If (isMarch and ((SecondSundayOfMonth + 14) > CurrentDOM), 1, 0);
def DoSpringShift = If (SpringDSTShiftStart and SpringDSTShiftStop and EnableDSTAutoAdjust, 1, 0);

def isOctober = If (CurrentMonth == 10, 1, 0);
def isNovember = If (CurrentMonth == 11, 1, 0);
def FallDSTShiftStart = If (isOctober and ((SecondSundayOfMonth + 14) <= CurrentDOM), 1, 0);
def FallDSTShiftStop = If (isNovember and FirstSundayDOM1 > CurrentDOM, 1, 0);
def DoFallShift = If (FallDSTShiftStart or FallDSTShiftStop and EnableDSTAutoAdjust, 1, 0);

def isToday = If(GetDay() == GetLastDay(), 1, 0);

#PITA. SecondsTillTime only takes constants... Need to manually adjust for DST if it's enabled.
def DSTAdjust = If (DoSpringShift, DSTOffsetHours * 3600, If (DoFallShift, -DSTOffsetHours * 3600, 0));


def TradingOpenTime1 = If((SecondsTillTime(TradingOpen1) + DSTAdjust > 0), 0, 1);
def TradingCloseTime1 = If((SecondsTillTime(TradingClose1) + DSTAdjust > 0), 0, 1);
def TradingWindow1 = If(TradingOpenTime1 and !TradingCloseTime1, 1, 0);

def TradingOpenTime2 = If((SecondsTillTime(TradingOpen2) + DSTAdjust > 0), 0, 1);
def TradingCloseTime2 = If((SecondsTillTime(TradingClose2) + DSTAdjust > 0), 0, 1);
def TradingWindow2 = If(TradingOpenTime2 and !TradingCloseTime2, 1, 0);


AddVerticalLine(TradingWindow1 and TradingWindow1[1] == 0 and timetest, "TradingOpen 1" , Color.GREEN, Curve.SHORT_DASH);
AddVerticalLine(TradingWindow1 == 0 and TradingWindow1[1] and timetest, "TradingClose 1" , Color.RED, Curve.SHORT_DASH);

AddVerticalLine(TradingWindow2 and TradingWindow2[1] == 0 and timetest, "TradingOpen 2" , Color.GREEN, Curve.SHORT_DASH);
AddVerticalLine(TradingWindow2 == 0 and TradingWindow2[1] and timetest, "TradingClose 2" , Color.RED, Curve.SHORT_DASH);


#####-------------------------------------TESTER-----------------------------------------------------

def ITM1 = if timetest and TradingWindow1 == 0 and TradingWindow2 == 0 then 0 else if (Up[expiry] and close[0] > close[expiry]) or (Down[expiry] and close[0] < close[expiry]) or (secondcandle and Up[2] and close[1] < close[2] and close > close[1]) or (secondcandle and Down[2] and close[1] > close[2] and close < close[1]) then 1 else 0;
def itm = if IsNaN(ITM1) then 0 else ITM1;
def itmsum = TotalSum(itm);

def OTM1 = if timetest and TradingWindow1 == 0 and TradingWindow2 == 0 then 0 else if (Up[expiry] and close[0] < close[expiry]) or (Down[expiry] and close[0] > close[expiry]) or (secondcandle and Up[2] and close[1] < close[2] and close < close[1]) or (secondcandle and Down[2] and close[1] > close[2] and close > close[1]) then 1 else 0;
def otm = if IsNaN(OTM1) then 0 else OTM1;
def otmsum = TotalSum(otm);

def itmrate = RoundUp((itmsum / (itmsum + otmsum) * 100), 2);
def label = 1;

AddLabel(label, Concat("ITM = ", itmsum), Color.GREEN);
AddLabel(label, Concat("OTM = ", otmsum), Color.RED);
AddLabel(label, Concat("ITM RATE = %", itmrate), Color.WHITE);

#####---------Moneycount--------------------------------------------
def PL = invest * itmsum * RPI - invest * otmsum;
def PLColor = if PL > 0 then 6 else 5;

AddLabel(moneycount, Concat("PROFIT/LOSS = $", PL), GetColor(PLColor));
 

Вложения

  • 30.10.015-ind-№5=stv-50р=2.300р+.png
    30.10.015-ind-№5=stv-50р=2.300р+.png
    189.2 КБ · Просмотры: 1,031
  • Screenshot_1.png
    Screenshot_1.png
    163.3 КБ · Просмотры: 997
Последнее редактирование модератором:

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.

Вложения

  • Screenshot_2.png
    Screenshot_2.png
    195.6 КБ · Просмотры: 228

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
viktor8821, покажите лучше всем результат за более долгий период + по нескольким валютным парам с одними и теми же параметрами.
Уже давно известно что любой стрелочник можно подогнать к хорошим процентам по 1 валюнтой паре, на определнном ТФ. А как только его ставишь с такими же настройками на другой ТФ и другую валютную пару, то сразу % меньше 50.
Кстати здесь нато и делятся индюками чтобы тестить всем вмести а не так чтобы один зделал тестил и грааль выложыл
 

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
вот
 

Вложения

  • Screenshot_3.png
    Screenshot_3.png
    187.3 КБ · Просмотры: 235

mihanik455

Новичок
Регистрация
19.10.15
Сообщения
76
Реакции
10
mihanik455 не предоставил никакой дополнительной информации.
а что за индикатор его нужно в мт4 устанавливать?
 

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
уже 7-1
 

Вложения

  • Screenshot_5.png
    Screenshot_5.png
    73.6 КБ · Просмотры: 221

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
нажми в шапке на спойлер там кодиндюка
 

Relaxir

Местный
Регистрация
14.03.15
Сообщения
397
Реакции
361
Relaxir не предоставил никакой дополнительной информации.
Добрый вечер Viktor8821! На скрине (24 пост) со спойлера индюк? Просто не пойму, у меня за сутки сегодня тестер показывает всего 5/0 по евро/баксу, а у Вас 9/0 (скрин пост №24). И еще на EUR/USD какие настройки на указанном скрине?
 
Последнее редактирование:

Sentra

Местный
Регистрация
12.08.14
Сообщения
320
Реакции
112
Sentra не предоставил никакой дополнительной информации.
я правильно установила индикатор?
 

Вложения

  • Screenshot_112.png
    Screenshot_112.png
    65.7 КБ · Просмотры: 218

Sentra

Местный
Регистрация
12.08.14
Сообщения
320
Реакции
112
Sentra не предоставил никакой дополнительной информации.

Sentra

Местный
Регистрация
12.08.14
Сообщения
320
Реакции
112
Sentra не предоставил никакой дополнительной информации.
кажется вот так
 

Вложения

  • Screenshot_113.png
    Screenshot_113.png
    78.8 КБ · Просмотры: 206

Артём1987

Местный
Регистрация
26.03.14
Сообщения
151
Реакции
62
Артём1987 не предоставил никакой дополнительной информации.
Добрый вечер Viktor8821! На скрине (24 пост) со спойлера индюк? Просто не пойму, у меня за сутки сегодня тестер показывает всего 5/0 по евро/баксу, а у Вас 9/0 (скрин пост №24). И еще на EUR/USD какие настройки на указанном скрине?
Там возможно история больше стоит
 

Relaxir

Местный
Регистрация
14.03.15
Сообщения
397
Реакции
361
Relaxir не предоставил никакой дополнительной информации.
Там возможно история больше стоит
))) Я же посмотрел скрин, там стоит 1D 1M, настроил у себя точно так же, получилось 5 сигналов у меня и 9 на скрине Viktora8821, поэтому и задал вопрос...
 

Relaxir

Местный
Регистрация
14.03.15
Сообщения
397
Реакции
361
Relaxir не предоставил никакой дополнительной информации.
viktor8821 Вы видели мой вопрос? Почему у нас на одном индюке, одном ТФ и истории разные показатели?
 

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
настройки поменяйте вот скрин и пары смотрите по скрину на других парах индюк тупит лосей много
 

Вложения

  • Screenshot_3.png
    Screenshot_3.png
    187.3 КБ · Просмотры: 213
  • Screenshot_6.png
    Screenshot_6.png
    2.8 КБ · Просмотры: 211

CHITA

Старейшина
Регистрация
21.03.15
Сообщения
1,168
Реакции
108
CHITA не предоставил никакой дополнительной информации.
Виктор так это м5 или м1?
 
Верх Низ