Questions from Beginners MQL5 MT5 MetaTrader 5 - page 484
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
The problem is the following: when the Provider's orders are closed, the Subscriber's orders are still held. Apparently because of the difference in spread. How should I make deals of a Subscriber be closed immediately when they are closed at the Provider's one? What setting should be changed?
Thank you Alexey!!!! for 4))))
So...I found my old turkey and cut out what I needed from it. I won't write it for you)), but it will do for a kick start. I've added comments there, the names of the variables are clear from the names.
My friends, I have a question more about the signal setting.
The problem is the following: when orders of a Provider are closed, they still remain on the Subscriber's one. Apparently because of the difference in spread. How should I make deals of a Subscriber be closed immediately when they are closed at the Provider's one? What setting should be changed?
The deal should also close almost instantly. Questions:
So...I found my old turkey and cut out what I needed from it. I won't write it for you)), but it will do for a kick start. I added comments there, the names of variables are clear from the names.
Additionally, I should probably put indicator subwindow number in this line? I just don't know exactly what is needed
Addendum, you should probably put the indicator subwindow number on this line? I just don't know exactly what is needed
Oooops, absent-minded this morning, didn't copy the chart event handling in the code
So...I found my old turkey and cut out what I needed from it. I won't write it for you)), but it will do for a kick start. I have added comments there, the names of variables are clear from the names.
And where to attach the step, and in general its functionality, about what?
And this:
2. Заносить стрелки в структуры и класть их в хештаблицу, первый проще
I've never done. If you can, please give me a code example, so that I can understand, understand and apply it.
Oooops, absent-minded this morning, didn't copy the graph event handling in the code
It's easy enough when you know. Just bang on the keys, as long as you have the desire and means to do it.
And when you don't know and you're digging... that's a pain in the ass... And if there's more hints, you're screwed, no nerve at all.
So thank you for the tips!!!!
Thank you Alexey for your help!
Where do you screw in the pitch, and its functionality in general, about what?
And this:
I've never done. If you can, please give me a code example, so that I could understand, understand and use it.
When we compress the graph horizontally (+/- keys), it changes scale and sometimes the graphical objects can overlap each other. I cited this code just in case, how to determine the scale.
I won't cite the code with hash - I don't have it, it just occurred to me. It's better to do variant 1, it's simpler.
Regarding knowledge - I advise everyone who studies, read the help at your leisure, just hop around the sections, where everything is. That is, do not cram it, I was such a crammer, to no good. You just need to know, at least approximately, that there are such-and-such... at least sections/sub-sections. Then, when questions arise, the gears will spin in your head and a direction of search will arise. In principle, the help is not perfect, but it's fine, there are plenty of examples.
Because the language itself is simple, it's not hard to learn. Difficulties arise with API, where to look for what and how to apply
At first glance, the task seems as simple as three cents. BUT! ....
There is a line of any oscillator in the indicator window, which wiggles relative to "0" with different amplitude.
The actual problem is:
- At "0" crossing from bottom to top, draw an arrow at the bottom border of the indicator window,
- At "0" crossing from the top downwards, to draw an arrow near the upper border of the indicator window,
- at self-scaling of the oscillator chart in the indicator window, the arrows should automatically remain at their borders of the indicator window.
I.e., scrolling the chart backwards and forwards through the history, or changing its horizontal scale, the arrows should always remain at the boundaries of the indicator window automatically.
Please don't give any tips, "help me financially")). Please attach the source code of such a function, or link to it.
Thanks in advance!
Please help me to understand!
I need to find the maximum drawdown on each (let it be) day (writing to the file happens once a day) - MT4 terminal.
The max drawdown is the distance on the chart from the peak to the current drawdown of funds and the drawdown of funds is the current loss.
I wrote the following code
if(Analiz_Prosadki==true)
{
if(ContolSavaTXT==1)
{
ProfitNew=0;
ProfitMin=0;
ContolSavaTXT=0;
}
if(ContolSavaTXT==0)
{
ProfitNew=AccountInfoDouble(ACCOUNT_PROFIT);
BalansNew==AccountInfoDouble(ACCOUNT_BALANCE); //Текузее значение баланса
if (BalansNew>BalansMax) BalansMax=BalansNew;
if (ProfitNew<ProfitMin && BalansNew>=BalansMax) ProfitMin=ProfitNew;
if (ProfitNew<ProfitMin && BalansNew<BalansMax) ProfitMin=ProfitNew-(BalansMax-BalansNew);
}
ContolSavaTXT=Printer.Write((string)TimeCurrent(),ProfitMin); // Пишем информацию в файл - функция возвращает 1
}
But it is correct in some charts and incorrect in others. At the same time, the charts are visually the same.
I must have made a mistake in the code or logic, but I cannot understand what kind.