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

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
Последнее редактирование модератором:

Sentra

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

viktor8821

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

CHITA

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

viktor8821

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

Relaxir

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

viktor8821

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

viktor8821

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

mihanik455

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

Вложения

  • Снимокrwerer.PNG
    Снимокrwerer.PNG
    132.4 КБ · Просмотры: 131

viktor8821

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

Вложения

  • Screenshot_11.png
    Screenshot_11.png
    194.9 КБ · Просмотры: 130

viktor8821

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

Relaxir

Местный
Регистрация
14.03.15
Сообщения
397
Реакции
361
Relaxir не предоставил никакой дополнительной информации.

viktor8821

Местный
Регистрация
12.12.14
Сообщения
255
Реакции
94
viktor8821 не предоставил никакой дополнительной информации.
Если не секрет у какого брокера работаете? Просто сам на минутах, поэтому интересуюсь
verumoption засунул туда пару баксов а заберу или нет только черт знает:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D
 

viktor8821

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