[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 385
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
что тут не так?
Короче этот советник я прикрепляю к часовому графику, и если цена в начале часа выше чем cn1 а текущая не привышает её на 8 пунктов то ордер должен открыться (также если цена ниже текущего уровня) А он у меня почему-то сразу открывает позицию. Почему?
And where is the 8-point condition written? Better to multiply eight by MarketInfo(NULL,MODE_POINT);
А где записано условие на 8 пунктов? лучше восемь умножать на MarketInfo(NULL,MODE_POINT);
Michey25
when i was answering the code was a bit different ;)
Although there are some questions, the result of op(0) depends a lot on the current timeframe. it's not clear where the cn comes from and what type they are.
Can't you make Alert(Open[0],cn1,Open[0]<cn1,a,(a-cn1)<0.0008)?
Also better use break instead of i=1, this will exit the loop immediately instead of running all commands to the end.
Hello. Please help me implement the following thing. There are 2 independent conditions in one EA, based on which separate orders are opened, each with its own magic. At any given time on one chart there can be only one order for each of the conditions, and they can be at the same time with each other. To check the possibility of opening orders, I do the following structure
But the orders are only opened with the second magic.
Then the orders are also closed independently of each other. At the same time, the order with the first magic uses a trawl and the second does not
I have used this example, but the closing either does not happen according to the rules of either the first or the second condition, or does not happen at all
Sell1, buy1, sellcl0, buycl0 are descriptions of closing conditions.
Would such a double override of positions work at all? Thank you!
Здравствуйте. Помогите пожалуйста реализовать такую вещь. В одном эксперте работают 2 независимых условия, на основе которых открываются отдельные ордера, каждый со своим magic. В каждый момент времени на одном графике может быть только один ордер по каждому из условий, при этом они могут быть одновременно друг с другом. Для проверки возможности открытия ордеров делаю такую конструкцию
Но открываются ордера только со вторым magic.
Далее, закрываются ордера тоже независимо друг от друга. При этом ордер с первым magic использует трал, а второй нет
Применил вот такой вариант, но закрытия либо происходят не по правилам ни от первого, ни от второго условия, либо не происходят вообще
sell1, buy1, sellcl0, buycl0 - описания условий на закрытие.
Будет ли вообще работать такой двойной перебор позиций? Благодарю!
after closing and deleting orders, remove the returnee and put it at the end of the function or put a continuum instead
Hi all, I'm writing my first mql program and learning the language at the same time.
I have a question, can you advise me?
I've got a question: if I'm writing my first mql program, I'd like to know what's wrong with it. Can you tell me what's wrong? I've spent four hours looking through the reference book, I don't understand it myself.
void CheckSell()
{
while(!(NormalizeDouble(Price,Digits) < NormalizeDouble(MA10,Digits)))
{
Sleep(5);
RefreshRates();
}
Sell();
}
Hi all, I'm writing my first mql program and learning the language at the same time.
I'm learning the language. Can you advise me please?
I've got a question: if I've got a buy, then the function that checks conditions for sale is called, and then the tester hangs and the code is not executed any more. Can you tell me what's wrong? I poked around the reference book for about four hours, I don't understand it.
void CheckSell()
{
while(!(NormalizeDouble(Price,Digits) < NormalizeDouble(MA10,Digits)))
{
Sleep(5);
RefreshRates();
}
Sell();
}
And what I did the loop for. If there is no condition we should not wait for some unknown number of days for the signal to appear.
Good afternoon.
The indicator has IndicatorShortName("iC_C_mod, ..... ");
I need, however, besides this caption, to insert a comment with a dynamically changing variable in the indicator window.
Like f-i Comment();
I need it in the indicator window, but not on the chart.
Please advise ?
void CheckSell()
{
if((NormalizeDouble(Price,Digits) < NormalizeDouble(MA10,Digits)))
Sell();
}
Probably something like this, because infinite loops take a very long time on modern hardware.