[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 416
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
Can you tell me how to pass one dimension from a two-dimensional array to a function?
I'm confused about something.
int testarray[5][2] = {1,2,3,4,5,6,7,8,9,10};// хоть так и можно записать, но в уме нужно держать что это ТАБЛИЦА
void testfunc(int &inarray[][]){ // массив нужно передавать "как есть", но обрабатывать можно выбранную часть
string out_str="Result: "+inarray[i,0];
for (int i=1;i<5;i++){// еще нужно учитывать, что счет в массивах начинается с НУЛЯ. "первый - нулевой"
out_str += (", "+inarray[i,0]); // здесь бы использовал строковую функцию конкатенации
}
Print(out_str);
}
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
Print("Call first:");
testfunc(testarray);
Print("Call second:");
testfunc(testarray);
//----
return(0);
}
//+-----------
I have two copies of the same broker's platform. Each has its own demo account and a shared folder called experts.
If I open the first one, then close it, then open the second one, I need to enter the password again in the second one.
I close the second and open the first one - now I need password for the first one. Is it supposed to be like this?
Thank you!
high=iHigh(NULL,60,1); Or is something wrong?
Everything is correct. But if you want to use multiple timeframes or symbols, you need to make corresponding logic in your EA.
Все правильно конечно. Но если нужно использовать несколько таймфреймов или инструментов, то нужно делать соотвествующую логику в советнике.
OK, I'll look into it. Thank you!
It's me again... Don't scold me too much... I have about two weeks of experience with EAs...
I have created my Expert Advisor based on fractals but it keeps showing OrderModify error 1 in my log during the test, although my moose is moving correctly based on fractals. I used Kim's FindNearFractal function. The code is as follows:
And on additions another question. The code is as follows: If I set a fractal breakthrough (or any other signal) instead of OrderProfit()>20 in the add condition, it opens many positions. I tried to add Sleep()-it does not help. What is the problem here?OrderModify error 1 usually happens when the new parameters exactly match those in the order...
обычно OrderModify error 1 бывает, когда новые параметры точно соответствуют тем, что в ордере..
Thank you, keekkenen! The parameters are different. The answer is found here. The advice (in the thread) is to nail this error...NormalizeDouble doesn't help either.
And what can you say about the second error (on additions)?
how do you find out how much paper profit, i.e. profit on unclosed positions, is currently in the EA?
KimIV has the GetProfitOpenPosInPoint() function.
У KimIV есть функция GetProfitOpenPosInPoint().
can I do it this way, and will it work?
or would it be better to insert the script code into the EA?