Doing EAs for control and risk management. What is the best way to prohibit all running EAs to trade? For example, by a specific symbol, we prohibit all running EAs to enter new trades. Unfortunately, there is no source code of all running EAs and there is no way to use global variables.
Добавил тему Целевая функция в тестере Коллеги решил выделить вопрос в отдельную тему. При оптимизации параметров советника существует ряд стандартных функций, а так же "Максимум пользовательского критерия" что позволяет производить подбор относительно собственной целевой, пусть даже Если Вы являетесь владельцем инвестиционного фонда и...
On Balance Volume (OBV) Индикатор Балансового Объема (On Balance Volume, OBV) связывает объем и изменение цены, сопровождавшее данный объем. Momentum Индикатор движущей силы рынка (Momentum) измеряет величину изменения цены финансового инструмента за определенный...
1. Decide for yourself from when you want to count.
2. Create an array with two elements.
3. Add a one at each candle to the right element.
4. Decide when you want to stop counting.
A moving average is a lagging tail of price. Profit does not live there.
Aleksei, thank you!
Could you please tell me where to add arrays and one to make it work?
for(int i=1;i<=10;i++) //допустим надо проверить 10 свечей выше или ниже МА в момент когда обратились к этому оператору
{
double hig10 = iMA (NULL,PERIOD_H1,10, 0, MODE_SMA, PRICE_CLOSE, i);
if (hig10>iClose(Symbol(),PERIOD_H1,i))
{
// тут выполняем - если все 10 свечей выше МА
}
else
{
//тут выполняем - если если хотябы одна из свечей закрылась нижн MA
}
}
don't forget to zero out the elements before you start using them
count.up=0;
count.dn=0;
and then increase the count where needed
count.up++;
//или
count.dn++;
then compare
if(count.up>10)
{
}
You have now made a loop around the previous 10 candles on each new cand le. This is not rational. You should always get rid of unnecessary cycles by remembering the results of the calculations of the previous values. In your case, when a new candle arrives, just increase the count when the condition is fulfilled, and if the condition is not fulfilled, then subtract it. And check if there is no excess. Your cycle for 10 elements is not needed, only the main one.
Hi Experts!
Can you please advise me, is it possible to put MT4 on VPS server with Linux operating system? Will EAs work normally on such MT?
Hello.
Doing EAs for control and risk management. What is the best way to prohibit all running EAs to trade? For example, by a specific symbol, we prohibit all running EAs to enter new trades. Unfortunately, there is no source code of all running EAs and there is no way to use global variables.
odyn:
with a Linux operating system?
Mikhail works on Linux. Email him at https://www.mql5.com/ru/users/nikelodeon
Good evening!
Please help with the following question:
You need to know how many candles closed abovethe moving average, and how many below.
For example: If 20 candlesticks closed above the moving average with a period of 20, then do something else, if below.
Thank you!
What is the best way to ban all running EAs from trading?
If you can't change the EA code, then disable auto-trading. Here is the code, not mine:
You need to find out how many candles closed abovethe moving average and how many below.
1. Decide for yourself from which point you want to count.
2. Create an array with two elements.
3. Add a one at each candle to the right element.
4. Decide when you want to stop counting.
A moving average is a lagging tail of price. Profit does not live there.
1. Decide for yourself from when you want to count.
2. Create an array with two elements.
3. Add a one at each candle to the right element.
4. Decide when you want to stop counting.
A moving average is a lagging tail of price. Profit does not live there.
Aleksei, thank you!
Could you please tell me where to add arrays and one to make it work?
It is even better to make a structure
don't forget to zero out the elements before you start using them
and then increase the count where needed
count.up++; //или count.dn++;then compare
You have now made a loop around the previous 10 candles on each new cand le. This is not rational. You should always get rid of unnecessary cycles by remembering the results of the calculations of the previous values. In your case, when a new candle arrives, just increase the count when the condition is fulfilled, and if the condition is not fulfilled, then subtract it. And check if there is no excess. Your cycle for 10 elements is not needed, only the main one.If you can't change the EA code, then disable auto-trading. Here's the code, not mine:
Thank you. Will this code disable auto-trading for the specific EA attached to the specified chart? Or general autotrading in the terminal?
All trade, this button: