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
Print the ObjectCreate results, maybe there is an error there.
Thank you. I will definitely check, but after fixing the new problem. The EA worked for a while and has now been automatically removed from the chart. I can't put it back, it says the array is full.
Candle=1000. The compiler doesn't swear anywhere, nothing appears in the debugger. Please suggest a solution to the problem
This has already been corrected.
The next build will very rarely ask for signals if you don't use them.
This has already been corrected.
Why ArrayResize=0?
And it looks like ArrayInitialize should be added before it.
И
double H
Is it initialized each time in loop?
Declare it before the function.
Upd and double-check parentheses, I'm missing one } in
Why ArrayResize=0?
Zeroing array High[]
No, you set its size to 0.
Does the information remain at size 0? How is zeroing performed correctly?
You set the size to zero and then copy the array there.
Try that.
void CreateLevels() { double High[]; ArrayResize(High,Candle); // размер = Candle ArrayInitialize(High,NULL); // инициализация нулем ArraySetAsSeries(High,true); CopyHigh(_Symbol,_Period,0,Candle,High); double H; // вынес int j; // вынес for(j=Nachalo;j<=Candle;j++) { //--- поиск макс ----------------------------------- if(iHighest(Symbol(),0,10,MN*2,j-MN)==j) { H=High[j]; } } } // скобки сразу парами ставьте, искать не прийдётся
Upd corrected the code, also int jAnd with size 0 the information stays?
And, if you kill it, you could probably call ArrayResize twice, with 0, then with the right array size.
It might even be faster... Although I don't know how it would look like in terms of memory allocation.