Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 731

 
borilunad:

Connoisseurs! Help me simplify this expression:

N*(N+1)/2
 
TheXpert:
N*(N+1)/2
Thank you, Victor Vinin has already told me!
 
borilunad:
Thank you for your feedback, Artem! I am currently working on an Expert Advisor that does not require a large margin of safety. I tried it manually on several pairs, and it comes out quite good! That's why I want to setan EA for every pair, but they should not interfere with each other and be completely independent, even their working hours may not coincide! I will optimize each of them separately in the tester. What else do I need to understand that they will be so free-loving?! ;)

Well and put each one on its own chart with its own magician. This is enough if magicians inside the EA do not change (then random coincidences are possible). If magicians change, then you know how much they change, knowing your code. Simply set such a magician in every new EA on a different chart that it does not coincide with the one that is already working on the other one taking into account the possible change.

Let's say you have chosen a 100500 magic for the first EA and 100510 for the second and 100520 for the third, n - 1005n0 if the range of increase from 0 to 9 (10 magicians for one EA).

 
borilunad:
Use MathMaxes by pairing! Then you will need 3 MathMaxes for 4and 7MathMaxesfor 8.Good luck!
Thank you! I'll try it this way.
 
artmedia70:

Well and put each one on its own chart with its own magician. This is enough if the magics inside the EA do not change (then random coincidences are possible). If magics change, then you know how much they change if you know your code. Simply set such a magician in every new EA on a different chart that it does not coincide with the one that is already working on the other one taking into account the possible change.

Let's say you have chosen a 100500 magic for the first EA and 100510 for the second and 100520 for the third, n - 1005n0 if your values range from 0 to 9 (10 magicians for one EA).

Good morning, Artem! Yes, about magicians it is clear! But when something is not in a loop, but in conditions like if-else, it will be enough to put only first condition if(Symbol()==mySymbol) (without else of course), previously presenting mySymbol=Symbol()? So that all variables of all EAs are the same, but each on its own graph! I can't check it yet, I'm still writing, "making it out"! :)
 
Hello.

The new compiler generates an error message

'void' - illegal use of 'void' type tiny_19.mq4 177 1
'close_all_b' - function can be declared only in the global scope tiny_19.mq4 177 6


The code is as follows:

void close_all_b()
{
for(int q=0;q<OrdersTotal();q++)
{
OrderSelect(q,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol()==Symbol())&&(OrderMagicNumber()==MagicNumber)&& (OrderType() == OP_BUY) )
OrderClose(OrderTicket(),OrderLots(),Bid,5,Green);
}
} 

As far as I understand (my understanding is not good), it does not like void variable type and considers user functionclose_all_b() as an object inside another function. Please write how to correctly solve this problem.

 
xant:
Hello.

The new compiler generates an error message

'void' - illegal use of 'void' type tiny_19.mq4 177 1
'close_all_b' - function can be declared only in the global scope tiny_19.mq4 177 6

As far as I understand (my understanding is not good), it doesn't like void variable type and considers user functionclose_all_b() as a scope inside another function. Please write how to correctly solve this problem.
It does not like the declaration of close_all_b() inside another function. Nested functions are not allowed, all functions must be globally located.
 
Yes, thanks, I figured out what he didn't like, it wasn't clear how to fix it.

I copied it from someone else's code and it worked.)
 

Hello all!

Please advise what is the problem with iCustom value transfer in EA.

2014.10.12 10:23:06.656 TestGenerator: unmatched data error (volume limit 470 at 2014.03.14 21:45 exceeded)

2014.10.12 10:23:53.468 2014.03.06 18:15 ClusterExp2 GBPUSD,M15: 2147483647 2147483647

Delt1   = iCustom(NULL, 0, "correl8",1,0); // double Delt1; перечисление всех входных параметров correl8 не дало результата

Delt2   = iCustom(NULL, 0, "correl8",7,0); // double Delt1;

Correl8 indicator on a paperclip.

Thank you in advance!

Files:
correl8.mq4  16 kb
 
Fox_RM:

Hello all!

Please advise what is the problem with iCustom value transfer in EA.

2014.10.12 10:23:06.656 TestGenerator: unmatched data error (volume limit 470 at 2014.03.14 21:45 exceeded)

2014.10.12 10:23:53.468 2014.03.06 18:15 ClusterExp2 GBPUSD,M15: 2147483647 2147483647

Correl8 indicator on a paper clip.

Thank you in advance!

Upload the history for the symbol you are testing. Error in history data, not in iCustom()
Reason: