Dear experts, friends, brothers! Please advise a beginner how to correctly identify the situation when the EMA(8) on the previous bar "pierced" the candle. I use it as additional analysis for presence of flat. But it does not listen to me ...
... I calculate it this way:
//--------------------------------------------------------------- 5 --// Вычисление торговых критериев//-------------------------------------------------------------------// Покупка //-------------------------------------------------------------------if(
// Delta>0.0 && // Если тренд вверх
BrBl_1>0.001 && // Bears&Bulls выше порога срабатывания 0.001
BrBl_1<BrBl_0 && // Бурёнки рулят
MCDRmn_1>MCDRsig_1 && // Главная MACD Rounding выше сигнальной
MCDRmn_0>MCDRmn_1 && // Главная MACD Rounding поднимается
EMA8_1>(iClose(NULL,0,1)-iOpen(NULL,0,1)) && // Сигнальная EMA(8) ниже цены открытия предыдущего бара
PSAR_1<iOpen(NULL,0,1) // Значение параболика ниже цены открытия бара 1
)
return(10); // Открытие Buy //-------------------------------------------------------------------// Продажа //-------------------------------------------------------------------if(
// Delta<0.0 && // Если тренд вниз
BrBl_1<-0.001 && // Bears&Bulls ниже порога срабатывания -0.001
BrBl_1>BrBl_0 && // Топтыгины в думе
MCDRmn_1<MCDRsig_1 && // Главная MACD Rounding ниже сигнальной
MCDRmn_0<MCDRmn_1 && // Главная MACD Rounding опускается
EMA8_1>(iOpen(NULL,0,1)-iClose(NULL,0,1)) && // Сигнальная EMA(8) выше цены открытия предыдущего бара
PSAR_1>iOpen(NULL,0,1) // Значение параболика выше цены открытия бара 1
)
return(20); // Открытие Sell //-------------------------------------------------------------------
I'm a little confused as to the veracity of these expressions: For Bye:
EMA8_1>(iClose(NULL,0,1)-iOpen(NULL,0,1)) && // Сигнальная EMA(8) ниже цены открытия предыдущего бара
... And for Sell:
EMA8_1>(iOpen(NULL,0,1)-iClose(NULL,0,1)) && // Сигнальная EMA(8) выше цены открытия предыдущего бара
Help sort it out, don't let a man die in dreams of... Thank you... :)
Вы, видимо, подзабыли, что существует совершенно шикарная надстройкаEvgeTrofi для Эксел, которая загружает прямо HTML файл отчета без всякого ручного копирования.
I didn't check it right away... Thanks for the reminder, it's useful!
Mathemat>>: Ну да, условия неверны - если исходить из того, что комменты верны :) Наверно, должно быть так:
Для Бай: ... и для Селл: А до этого Вы сравнивали сигнальную ЕМА(8) (почти цену) с разницей цен на 1-м баре. Это ж несопоставимые величины.
Thanks for the quick reply, but there is an error in your example too. I need to check the condition shown in the picture - the candle completely overlaps the MA. If we check the condition, as you suggest, then let's assume the MA is higher than the candle (for Sell), then check the condition
EMA8_1 > iOpen(NULL,0,1) && // Сигнальная EMA(8) выше цены открытия предыдущего бара
... but! All is correct - the candle opened above the MA, so it is Sell. And if the candle closed below the MA? Then it will close below the MA with its body and there is no need to sell in this case, as well as to buy...
Спасибо за быстрый ответ, но и в вашем примере тоже есть ошибка. Мне нужно проверять условие, которое изображено на картинке - свеча полностью перекрывает собой МАшку. Если проверять условие, как предлагаете вы, то, допустим, Машка находится выше свечи (для Селл), тогда проверяем условие ... но! Всё верно - свеча открылась выше, значит Селл. А если свеча закрылась ниже МАшки? Тогда она и перекроет МАшку своим телом и продавать в данном случае не нужно, как впрочем и покупать...
Use this function to calculate the value of the centre line of the pitchfork, the upper and lower line being obtained by adding or subtracting the width of the channel, respectively.
This function is used to calculate the value of the centre line of the pitchfork, the upper and the lower line being obtained by adding or subtracting the width of the channel, respectively.
Can you send me a piece of code? I tried this function, it didn't work, it doesn't get a value?
How to implement between 17.00 and 18.30 if the closing price of a candle on M15 is below the trend line, then a pending order is placed -2 pips under the candle's LOW? Can you show me the code?
How do you get the values of an ANDRUS VIL at any point ?
from the "straight line equation"
... I calculate it this way:
I'm a little confused as to the veracity of these expressions:
For Bye:
... And for Sell:
Help sort it out, don't let a man die in dreams of...
Thank you... :)
I guess it should be like this:
For Bye:
... and for Sell:
And before that you were comparing the signal EMA(8) (almost price) with the price difference on the 1st bar. Those are not comparable values.
Вы, видимо, подзабыли, что существует совершенно шикарная надстройка EvgeTrofi для Эксел, которая загружает прямо HTML файл отчета без всякого ручного копирования.
I didn't check it right away... Thanks for the reminder, it's useful!
Ну да, условия неверны - если исходить из того, что комменты верны :)
Наверно, должно быть так:
Для Бай:
... и для Селл:
А до этого Вы сравнивали сигнальную ЕМА(8) (почти цену) с разницей цен на 1-м баре. Это ж несопоставимые величины.
Thanks for the quick reply, but there is an error in your example too. I need to check the condition shown in the picture - the candle completely overlaps the MA. If we check the condition, as you suggest, then let's assume the MA is higher than the candle (for Sell), then check the condition... but! All is correct - the candle opened above the MA, so it is Sell. And if the candle closed below the MA? Then it will close below the MA with its body and there is no need to sell in this case, as well as to buy...
How to get VIL ENDRUS values at any point ?
Write the code ?
Спасибо за быстрый ответ, но и в вашем примере тоже есть ошибка. Мне нужно проверять условие, которое изображено на картинке - свеча полностью перекрывает собой МАшку. Если проверять условие, как предлагаете вы, то, допустим, Машка находится выше свечи (для Селл), тогда проверяем условие... но! Всё верно - свеча открылась выше, значит Селл. А если свеча закрылась ниже МАшки? Тогда она и перекроет МАшку своим телом и продавать в данном случае не нужно, как впрочем и покупать...
Как получить значения ВИЛ ЭНДРЮСА в любой точке ?
Напишите код ?
https://docs.mql4.com/ru/objects/ObjectGetValueByShift
Use this function to calculate the value of the centre line of the pitchfork, the upper and lower line being obtained by adding or subtracting the width of the channel, respectively.
https://docs.mql4.com/ru/objects/ObjectGetValueByShift
This function is used to calculate the value of the centre line of the pitchfork, the upper and the lower line being obtained by adding or subtracting the width of the channel, respectively.
Can you send me a piece of code? I tried this function, it didn't work, it doesn't get a value?
How to implement between 17.00 and 18.30 if the closing price of a candle on M15 is below the trend line, then a pending order is placed -2 pips under the candle's LOW? Can you show me the code?