Переделанные и доработанные индикаторы для Thinkorswim!!!

Статус
Закрыто для дальнейших ответов.

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.
Всем доброго времени суток! Решил создать тему где те кто торгует с помощью платформы Thinkorswim могут выкладывать свои мысли касаемо индикаторов и того что можно прописать в код! Я понемаю что свои наработки некто не желает выкладывать это и понятно потому что вложено много сил а главное времени которое дороже денег да и вокруг много тех кто ничего не делает а просто качает или того хлещё потом продаёт! В данной теме любой может кинуть индюк с элементарной просьбой сделать аллерт или что то добавить в него! У меня почта иной раз разрывается просто из за подобного!Приведу несколько примеров!!!




Вобщем скрины можно кидать до бесконечности! Можете писать даже самые бредовые идеи, но они могут таковыми показаться для вас а на самом деле возможно реальны!
Я торгую на минутках и начну первым это моё малое!))))))))))))
 
Последнее редактирование модератором:

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.
УВЫ НЕ ТО! Мартин 3 колено бывает((((((((((((((((
 

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.

Taim

Гений
Регистрация
18.04.14
Сообщения
951
Реакции
983
Taim не предоставил никакой дополнительной информации.
kikos, как загрузить на форум видео, какого формата, а то у меня ругается, не хочет avi и mp4?
 

kif

Модератор
Регистрация
20.08.14
Сообщения
4,547
Реакции
3,827
kif не предоставил никакой дополнительной информации.

asl123

Местный
Регистрация
08.02.15
Сообщения
427
Реакции
602
asl123 не предоставил никакой дополнительной информации.

Вложения

  • HiLo3BarsBinaryOptions_MTF_Support_V2_tester_alertSTUDY.ts
    8.5 КБ · Просмотры: 16

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.

sadasd32cxv sadasd32cxv

Новичок
Регистрация
14.10.14
Сообщения
45
Реакции
3
sadasd32cxv sadasd32cxv не предоставил никакой дополнительной информации.
Вы можете сделать это без перерисовки (non repaint)

declare upper;

input AlertsOn = no;
input MO_length = 25;
input TypeMA = {default EMA, SMA};
input MA_length = 8;
input PC_length = 14;


def price = close;
def UMOBR = Highest(high[-0 + 1], 14);
def LOMOB = Lowest(low[-0 + 1], 14);
def MSMOB = (UMOBR + LOMOB) / 2;
def displacement = (-MO_length / 2) + 1;
def dPrice = hl2[displacement];

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

def ExtremeBand = CMA * 0.004 / 100;
;
def EOMOB = CMA * 0.01 / 100;
def NIMOB = CMA * 0.008 / 100;

def UMGOOB = if !IsNaN(price) then CMA + EOMOB else Double.NaN;
def LMGOOB = if !IsNaN(price) then CMA - EOMOB else Double.NaN;

def sDev = StDev(data = price[-0], length = 20);
def JMMOL = ExpAverage(data = price[-0], length = 20);
def JCMOL = JMMOL + -2.0 * sDev;
def JCMOU = JMMOL + 2.0 * sDev;


plot MOUp = if low <= LMGOOB and price crosses below LOMOB then 1 else 0;
;
MOUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
MOUp.SetDefaultColor(Color.WHITE);
MOUp.SetLineWeight(3);
Alert(AlertsOn && MOUp, "MOMAIN UP", Alert.BAR, Sound.Ding);
MOUp.HideBubble();
MOUp.HideTitle();

plot MODn = if high >= UMGOOB and price crosses above UMOBR then 1 else 0;
;
MODn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
MODn.SetDefaultColor(Color.WHITE);
MODn.SetLineWeight(3);
Alert(AlertsOn && MODn, "MOMAIN DN", Alert.BAR, Sound.Ding);
MODn.HideBubble();
MODn.HideTitle();

plot MOMUp = if low <= LMGOOB and price crosses below MSMOB then 1 else 0;
;
MOMUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
MOMUp.SetDefaultColor(Color.YELLOW);
MOMUp.SetLineWeight(3);
Alert(AlertsOn && MOMUp, "MOMAIN UP", Alert.BAR, Sound.Ding);
MOMUp.HideBubble();
MOMUp.HideTitle();

plot MOMDn = if high >= UMGOOB and price crosses above MSMOB then 1 else 0;
;
MOMDn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
MOMDn.SetDefaultColor(Color.YELLOW);
MOMDn.SetLineWeight(3);
Alert(AlertsOn && MOMDn, "MOMAIN DN", Alert.BAR, Sound.Ding);
MOMDn.HideBubble();
MOMDn.HideTitle();

plot JCMOUp = if low <= LMGOOB and price crosses below JMMOL then 1 else 0;
;
JCMOUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
JCMOUp.SetDefaultColor(Color.YELLOW);
JCMOUp.SetLineWeight(3);
Alert(AlertsOn && JCMOUp, "MOADIT UP", Alert.BAR, Sound.Ding);
JCMOUp.HideBubble();
JCMOUp.HideTitle();

plot JCMODn = if high >= UMGOOB and price crosses above JMMOL then 1 else 0;
JCMODn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
JCMODn.SetDefaultColor(Color.YELLOW);
JCMODn.SetLineWeight(3);
Alert(AlertsOn && JCMODn, "MOADIT DN", Alert.BAR, Sound.Ding);
JCMODn.HideBubble();
JCMODn.HideTitle();

plot MA;
switch (TypeMA) {
case EMA:
MA = ExpAverage(price[-0], MA_length);
case SMA:
MA = Average(price[-0], MA_length);
}
MA.AssignValueColor(if MA > MA[1] then Color.UPTICK else Color.DOWNTICK);
MA.SetLineWeight(3);
MA.HideBubble();
MA.HideTitle();

plot UpperBand = Highest(high[-0 + 1], PC_length);
UpperBand.SetDefaultColor(GetColor(5));
UpperBand.SetLineWeight(2);
UpperBand.HideBubble();
UpperBand.HideTitle();

plot LowerBand = Lowest(low[-0 + 1], PC_length);
LowerBand.SetDefaultColor(GetColor(6));
LowerBand.SetLineWeight(2);
LowerBand.HideBubble();
LowerBand.HideTitle();


rec up = if MOUp or MOMUp or JCMOUp then 1 else 0;
rec down = if MODn or MOMDn or jcmodn then 1 else 0;

##########---------------------------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));
 

kif

Модератор
Регистрация
20.08.14
Сообщения
4,547
Реакции
3,827
kif не предоставил никакой дополнительной информации.

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.

kikos

Старейшина
Регистрация
23.09.14
Сообщения
4,554
Реакции
6,126
kikos не предоставил никакой дополнительной информации.
Вы можете сделать это без перерисовки (non repaint)

declare upper;

input AlertsOn = no;
input MO_length = 25;
input TypeMA = {default EMA, SMA};
input MA_length = 8;
input PC_length = 14;


def price = close;
def UMOBR = Highest(high[-0 + 1], 14);
def LOMOB = Lowest(low[-0 + 1], 14);
def MSMOB = (UMOBR + LOMOB) / 2;
def displacement = (-MO_length / 2) + 1;
def dPrice = hl2[displacement];

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

def ExtremeBand = CMA * 0.004 / 100;
;
def EOMOB = CMA * 0.01 / 100;
def NIMOB = CMA * 0.008 / 100;

def UMGOOB = if !IsNaN(price) then CMA + EOMOB else Double.NaN;
def LMGOOB = if !IsNaN(price) then CMA - EOMOB else Double.NaN;

def sDev = StDev(data = price[-0], length = 20);
def JMMOL = ExpAverage(data = price[-0], length = 20);
def JCMOL = JMMOL + -2.0 * sDev;
def JCMOU = JMMOL + 2.0 * sDev;


plot MOUp = if low <= LMGOOB and price crosses below LOMOB then 1 else 0;
;
MOUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
MOUp.SetDefaultColor(Color.WHITE);
MOUp.SetLineWeight(3);
Alert(AlertsOn && MOUp, "MOMAIN UP", Alert.BAR, Sound.Ding);
MOUp.HideBubble();
MOUp.HideTitle();

plot MODn = if high >= UMGOOB and price crosses above UMOBR then 1 else 0;
;
MODn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
MODn.SetDefaultColor(Color.WHITE);
MODn.SetLineWeight(3);
Alert(AlertsOn && MODn, "MOMAIN DN", Alert.BAR, Sound.Ding);
MODn.HideBubble();
MODn.HideTitle();

plot MOMUp = if low <= LMGOOB and price crosses below MSMOB then 1 else 0;
;
MOMUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
MOMUp.SetDefaultColor(Color.YELLOW);
MOMUp.SetLineWeight(3);
Alert(AlertsOn && MOMUp, "MOMAIN UP", Alert.BAR, Sound.Ding);
MOMUp.HideBubble();
MOMUp.HideTitle();

plot MOMDn = if high >= UMGOOB and price crosses above MSMOB then 1 else 0;
;
MOMDn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
MOMDn.SetDefaultColor(Color.YELLOW);
MOMDn.SetLineWeight(3);
Alert(AlertsOn && MOMDn, "MOMAIN DN", Alert.BAR, Sound.Ding);
MOMDn.HideBubble();
MOMDn.HideTitle();

plot JCMOUp = if low <= LMGOOB and price crosses below JMMOL then 1 else 0;
;
JCMOUp.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_UP);
JCMOUp.SetDefaultColor(Color.YELLOW);
JCMOUp.SetLineWeight(3);
Alert(AlertsOn && JCMOUp, "MOADIT UP", Alert.BAR, Sound.Ding);
JCMOUp.HideBubble();
JCMOUp.HideTitle();

plot JCMODn = if high >= UMGOOB and price crosses above JMMOL then 1 else 0;
JCMODn.SetPaintingStrategy(PaintingStrategy.boolean_ARROW_DOWN);
JCMODn.SetDefaultColor(Color.YELLOW);
JCMODn.SetLineWeight(3);
Alert(AlertsOn && JCMODn, "MOADIT DN", Alert.BAR, Sound.Ding);
JCMODn.HideBubble();
JCMODn.HideTitle();

plot MA;
switch (TypeMA) {
case EMA:
MA = ExpAverage(price[-0], MA_length);
case SMA:
MA = Average(price[-0], MA_length);
}
MA.AssignValueColor(if MA > MA[1] then Color.UPTICK else Color.DOWNTICK);
MA.SetLineWeight(3);
MA.HideBubble();
MA.HideTitle();

plot UpperBand = Highest(high[-0 + 1], PC_length);
UpperBand.SetDefaultColor(GetColor(5));
UpperBand.SetLineWeight(2);
UpperBand.HideBubble();
UpperBand.HideTitle();

plot LowerBand = Lowest(low[-0 + 1], PC_length);
LowerBand.SetDefaultColor(GetColor(6));
LowerBand.SetLineWeight(2);
LowerBand.HideBubble();
LowerBand.HideTitle();


rec up = if MOUp or MOMUp or JCMOUp then 1 else 0;
rec down = if MODn or MOMDn or jcmodn then 1 else 0;

##########---------------------------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));

 

kif

Модератор
Регистрация
20.08.14
Сообщения
4,547
Реакции
3,827
kif не предоставил никакой дополнительной информации.

Alex

Местный
Регистрация
05.02.14
Сообщения
688
Реакции
514
Alex не предоставил никакой дополнительной информации.
sadasd32cxv sadasd32cxv, или же не исправлять , а ставить параметр MO_length равный 2 .
 

sadasd32cxv sadasd32cxv

Новичок
Регистрация
14.10.14
Сообщения
45
Реакции
3
sadasd32cxv sadasd32cxv не предоставил никакой дополнительной информации.
спасибо
 

Anatolii74

Новичок
Регистрация
12.03.15
Сообщения
34
Реакции
16
Anatolii74 не предоставил никакой дополнительной информации.
Или просто убрать минус перед MO_lenght...(потом смотрим на график и плачем:D:D:D)
 

m3ch4nik

Модератор
Регистрация
28.02.15
Сообщения
285
Реакции
214
m3ch4nik не предоставил никакой дополнительной информации.
...
 

Вложения

  • .NEW.png
    .NEW.png
    109.3 КБ · Просмотры: 104
Статус
Закрыто для дальнейших ответов.
Верх Низ