Perhaps to optimise the calculation we can check the order history differently
///// Есть некий массив торгуемых инстурментовstring symbolfotrade[] = {"EURUSD", .........}
///// Массив флаговbool isTradedClosed[] = {false, .....}
bool isTradedOpen[] = {false, .....}
//// Общая переменнаяbool isAllTraded = false;
int isTradedCount = 0;
int HistRegistr = 0; ////
start()
{
symbfotradeCount = ArraySize(symbolfotrade);
вначале перебор закрытых ордеров. С конца в начало
if (!isAllTraded)
{
Перебор закрытых ордеров с начала в конец int totalHistory = OrdersHistoryTotal();
for(HistRegistr = HistRegistr; HistRegistr < totalHistory; HistRegistr++)
{
символ = OrderSymbol();
Перебор массива торгуемых инструментов
for(int i = 0; i < symbfotradeCount; i++)
{
if (isTradedClosed[i]) continue;
Если (символ равен symbolfotrade[i]) то {isTradedClosed[i] = true; isTradedCount++; break}
}
}
Если isTradedCount==symbfotradeCount то isAllTraded = true; ///// Чтобы не лазать по массивам
}
I.e. check only newly closed orders. Thus, we will not try to check closed orders that have already been checked.
How do you optimise the multicurrency parameters? In the MT4 tester there's no possibility to test several symbols at once... I'm thinking about the multicurrency one and so far I've come to the idea that I optimize parameters for each symbol separately and then transfer these parameters to my Expert Advisor in the multicurrency mode.
Am I moving in the right direction or it's easier in fact?)
In mql5 it all can be implemented in one EA for testing and trading, but for now I've decided to study mql4.
I've just thought that if you can't test some symbols at once, why bother with one EA if you can just set your own copy of each symbol chart and it will be the same. I would like to hear the opinions of the community members)))
Help for a newbie, I am writing an EA using functions from KimIV, at first there were errors from them I think I got rid of them with the help of comments in his branch, but now there are warnings, I cannot understand how to make everything run smoothly when compiling, please tell me what the warnings mean
Function......... is not referenced and will be removed...
Help for a newbie, I am writing an EA using functions from KimIV, at first there were errors from them I think I got rid of them with the help of comments in his branch, but now there are warnings, I cannot understand how to make everything run smoothly when compiling, please tell me what the warnings mean
Function ......... is not referenced and will be removed...
It means that this function is not used anywhere.)
Double-click on this message and MetaEditor will show you where it is. You can either delete it or comment out /* */.
This means that this function is not used anywhere.))
Double-click on this message and MetaEditor will show you where it is. You can either delete it or comment out /* */.
Or do not touch it at all. When you will be remaking your Expert Advisor, it may come in handy. Better yet, hook up all of Kim's functions at once in the form of libraries and use any of them you want.
Guys, can you suggest a script which calculates the profit of open positions by a certain magik number, i.e. I want to place two grids of orders with opposite orders on one currency pair, and I can't deal with it manually.
zelek: Guys, can you suggest a script which calculates the profit of open positions by a certain magik number, i.e. I want to place two grids of orders with opposite orders on one currency pair, and I can't deal with it manually.
Thank you!
I.e. check only newly closed orders. Thus, we will not try to check closed orders that have already been checked.Perhaps to optimise the calculation we can check the order history differently
How do you optimise the multicurrency parameters? In the MT4 tester there's no possibility to test several symbols at once... I'm thinking about the multicurrency one and so far I've come to the idea that I optimize parameters for each symbol separately and then transfer these parameters to my Expert Advisor in the multicurrency mode.
Am I moving in the right direction or it's easier in fact?)
In mql5 it all can be implemented in one EA for testing and trading, but for now I've decided to study mql4.
I've just thought that if you can't test some symbols at once, why bother with one EA if you can just set your own copy of each symbol chart and it will be the same. I would like to hear the opinions of the community members)))
Help for a newbie, I am writing an EA using functions from KimIV, at first there were errors from them I think I got rid of them with the help of comments in his branch, but now there are warnings, I cannot understand how to make everything run smoothly when compiling, please tell me what the warnings mean
Function......... is not referenced and will be removed...
Help for a newbie, I am writing an EA using functions from KimIV, at first there were errors from them I think I got rid of them with the help of comments in his branch, but now there are warnings, I cannot understand how to make everything run smoothly when compiling, please tell me what the warnings mean
Function ......... is not referenced and will be removed...
It means that this function is not used anywhere.)
Double-click on this message and MetaEditor will show you where it is. You can either delete it or comment out /* */.
This means that this function is not used anywhere.))
Double-click on this message and MetaEditor will show you where it is. You can either delete it or comment out /* */.
Better yet, hook up all of Kim's functions at once in the form of libraries and use any of them you want.
All of Kim's functions in the form of plug-in libraries.
Can you please tell me how to open a position after a certain number of bars have passed after crossing, say, a MA?
For example, the price has closed behind the MA. I wait for the next bar and if it is the same colour and not a doji, I open a position.
It turns out that my opening candle is the third.
Example is shown in the attached file.
Thank you.
double mashka=iMA(.....,3);
if(Close[3]>Open[3]&&Close[3]>mashka&&mashka>Open[3]&&Your condition) ....
Guys, can you suggest a script which calculates the profit of open positions by a certain magik number, i.e. I want to place two grids of orders with opposite orders on one currency pair, and I can't deal with it manually.