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 terminal has an option to set the equidistant channel, you can set it instead of drawing the trend lines
here is a function similar to the trend line setting
It seems to be on the right.
oops...
в терминале есть возможность установки равноудалённого канала, можно вместо отрисовки трендовых линий устанавливать его
вот составил функцию по подобию установки трендовой линии
interesting
how to set the distance between the lines ?
the distance is set by itself, you only need to indicate three points t1,p1,t2,p2,t3,p3
I gave up this function (it has one short line), it is easier, more instructive to draw trend lines
растояние само устанавливается, надо только указать три точьки t1, p1, t2, p2, t3, p3
отказался я от этой функции(там одна линия короткая), проще, нагляднее просто трендовые линии рисовать
set the distance between the lines
the second line is supposed to be shifted relative to the first (trend) line and parallel to it horizontally by a certain value of bars - for example, by 5 bars
this is also an equidistant channel which cuts spikes up or down depending on the baseline setting and the trend direction.
The function removes zeros from the duplicate array and returns the index of the minimum of the array
Good afternoon everyone!
I don't know if this issue has already been discussed... But I wanted to suggest to make a function for EAs to work with a fixed balance.
This is necessary for optimizing EAs.
What we have here is as follows: when we start the EA, it starts to earn and AccountBalance starts to increase and the EA uses an ever increasing amount of balance.
If we introduce a variable, such as Valance, and set an amount in it, which the EA will "see" and purchase only for this amount. This will allow us to think that every time the EA starts to work, it will think that it only has Balance money at its disposal and over the entire testing period we will be able to believe how the EA would work if we switch it on any given day, excluding the factor of the real balance change.
Optimized with this variable, the Expert Advisor will work more normally in the future.
The only thing left to do is to code such a function.
This is all I know:
extern double Balance = 10000;
int init() {
//fix the balance at the beginning of the EA operation
Balance=AccountBalance;
return (0);}
int start {
//-------------------------
???
//-------------------------
}
And what to write in ??? I do not know. If there was a function in the EA where the calculation of the possible number of opening orders with a given lot was performed, using AccountBalance, you could simply replace AccountBalance() with a variable, but not all EAs explicitly do this.
Не знаю, может этот вопрос уже обсуждался... Но я хотел предложить сделать функцию для работы советника с фиксированным балансом.
I solved this problem this way
I have a lot of different Expert Advisors and when I start any of them, for the first time a day, the account balance is stored in a global variable and based on this the Expert Advisors calculate the number of lots and the resulting income, showing the information on the chart in the comments (yield: so-and-so %)
I have a lot of different EAs and when I start any of them, the first time a day, the account balance is saved in a global variable and based on that the EAs calculate the number of lots and the resulting income, showing information on the chart in the comments (yield: so-and-so %)
Can you share with us the details how it can be done?
нужна мне такая возможность - параллельного горизонтального смещения (копирования, переноса...) трендовой линии на определенное кол-во баров
Geronimo, describe the algorithm in more detail in my personal or ICQ: 9773190, let's not clutter up the thread
Any way I can help
share the details how to do it?
Nail_Saby, I described the gist, and you can implement it in different ways, depends on how and what exactly you need