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

 
Vinin:

Do you like to do everything through the ass?

Bold. You and your arse. What, are you taking advantage of remote communication?

I will answer in turn. This is an example on the simplest variant of the indicator that clearly shows the general problem. More complex ones, with a significant number of attachments and custom functions also, once compiled, do not work.

Unfortunately I'm not fluent in MetoEditora. And while such concepts as DLL are not familiar to me, that's why my question in section for newbies. Although I've already found part of the problem myself. It's necessary to move from attachment file "AO_EMA_(with_includes)_GLOB.mq4" all lines with "#property " to the main file "AO_EMA_(with_includes).mq4". In this case, everything works properly. It follows that in the new MetoEditor Build, all #property should be in the main".mq4" file. Am I right or not? Although in the old MetoEditor this requirement was optional.

 
NEP:

Bold. You and your arse. What, are you taking advantage of remote communication?

I will answer this in turn. This is an example on the simplest variant of the indicator that clearly shows the general problem. More complex, with a significant number of attachments and custom functions also, after compilation, does not work.

Unfortunately I'm not fluent in MetoEditora. And while such concepts as DLL are not familiar to me, that's why my question in section for newbies. Although I already found part of the problem myself. It's necessary to move from attachment file "AO_EMA_(with_includes)_GLOB.mq4" all lines with "#property " to the main file "AO_EMA_(with_includes).mq4". In this case, everything works properly. It follows that in the new MetoEditor Build, all #property should be located in the".mq4" main file. Am I right or not? Although in the old MetoEditor this requirement was optional.

I use libraries extensively in my developments, but I would characterize your approach in a similar way. :)))
 
NEP, you got the "ass" you deserved, because you have to click on the SRC, not the picture, to insert your code! And then you can look at your code!
 

borilunad:

I use libraries extensively in my developments, but I would describe your approach similarly. :)))

TarasBy :

You got the "ass" deservedly, because to insert code you have to click not on the picture, but on the SRC! And then you can already look at your code!

With this message I withdraw my question from the discussion.

Thank you all for your replies. Once again it all ended up being just a conversation, without any result. TarasBy, it was my first post on the site and how to use inserts (through SCR or changing the post style) is hard to understand. But it's a thing of the past, I'll figure it out.

borilunad: I will definitely take your advice on using DLLs, I haven't got round to it yet. Would you try to write a program in a language you're not familiar with (from this language I began to learn programming), having only a list of functions and a few examples of working indicators, when you don't have access to the Internet for half a year and can't ask anyone for advice. I wrote it the way I thought it up.

I repeat, this section is for newbies. Instead of expressing solidarity with the moderator, you'd better be more specific in your replies to the main question. Although...

 
NEP:

I hereby withdraw my question from the discussion.

Thank you all for your replies. Once again it all ended up being just a conversation, with no result. TarasBy, it was my first post on the site and how to use inserts (through SCR or changing the message style) is hard to understand. But it's a thing of the past, I'll figure it out.

borilunad: I will definitely take your advice on using DLLs, I haven't got round to it yet. Would you try to write a program in a language you're not familiar with (from this language I began to learn programming), having only a list of functions and a few examples of working indicators, when you don't have access to the Internet for half a year and can't ask anyone for advice. As I thought it out, I wrote it.

Again, this is a section for newcomers. Instead of expressing solidarity with the moderator, it would be better to be more specific about the main issue. Although...


When starting to learn programming, get your logic in order first! I don't use libraries at all, so I couldn't advise you to do that, especially for a beginner! And advised to use the button SRC, because it is normal first to see what features are provided for our convenience, and then post, paste, etc. And for programming apart from logic, you need to be careful, accurate, diligent and resourceful! I wish you success!
 

Hello! Could you give me a hint?

Here are the input parameters

   extern int Kx=1;
   extern int Tx=2;
   extern int SAx=3;
   extern int SBx=4;
   extern int BIDx=5;

How to make it not optimize when at least two of the parameters are the same

if( Kx==Tx||Tx==SAx||SAx==SBx||SBx==BIDx||Kx==SAx||Kx==SBx||Kx==BIDx||Tx==SBx||Tx==BIDx||SAx==BIDx)
 
niktron:

Hello! Could you give me a hint?

Here are the input parameters

How to make it not optimized when the values of at least two parameters are the same


You set the steps in the optimizer yourself! Don't do it! How? Come up with some algorithm that doesn't allow coincidences! You have an idea! Do it!

On the other hand, until you figure it out, optimize it, and discard variants with matching! And this condition can really slow down your code!

 
Maybe someone could use variants with mismatched values from 1 to 5...Oh, and if anyone sees a mistake History will not forget you!)
if  (   (a==1&& b==4&& c==3&& d==2&& e==5)|| (a==1&& b==2&& c==3&& d==5&& e==4)|| (a==1&& b==4&& c==5&& d==3&& e==2)||
        (a==1&& b==3&& c==4&& d==2&& e==5)|| (a==1&& b==5&& c==4&& d==2&& e==3)|| (a==1&& b==5&& c==4&& d==3&& e==2)||
        (a==1&& b==4&& c==2&& d==3&& e==5)|| (a==1&& b==4&& c==5&& d==2&& e==3)|| (a==2&& b==4&& c==3&& d==1&& e==5)||
        (a==1&& b==2&& c==4&& d==3&& e==5)|| (a==1&& b==5&& c==2&& d==4&& e==3)|| (a==2&& b==3&& c==4&& d==1&& e==5)||
        (a==1&& b==3&& c==2&& d==4&& e==5)|| (a==1&& b==2&& c==5&& d==4&& e==3)|| (a==2&& b==4&& c==1&& d==3&& e==5)||
        (a==1&& b==2&& c==3&& d==4&& e==5)|| (a==1&& b==4&& c==2&& d==5&& e==3)|| (a==2&& b==1&& c==4&& d==3&& e==5)||
        (a==1&& b==5&& c==3&& d==2&& e==4)|| (a==1&& b==2&& c==4&& d==5&& e==3)|| (a==2&& b==3&& c==1&& d==4&& e==5)||
        (a==1&& b==3&& c==5&& d==2&& e==4)|| (a==1&& b==3&& c==4&& d==5&& e==2)|| (a==2&& b==1&& c==3&& d==4&& e==5)||
        (a==1&& b==5&& c==2&& d==3&& e==4)|| (a==1&& b==4&& c==3&& d==5&& e==2)|| (a==2&& b==1&& c==3&& d==5&& e==4)||
        (a==1&& b==2&& c==5&& d==3&& e==4)|| (a==1&& b==3&& c==5&& d==4&& e==2)|| (a==2&& b==1&& c==5&& d==3&& e==4)||
        (a==1&& b==3&& c==2&& d==5&& e==4)|| (a==1&& b==5&& c==3&& d==4&& e==2)|| (a==2&& b==3&& c==5&& d==1&& e==4)||
        
        
        (a==2&& b==3&& c==1&& d==5&& e==4)|| (a==2&& b==4&& c==5&& d==3&& e==1)|| (a==3&& b==1&& c==5&& d==2&& e==4)||
        (a==2&& b==5&& c==1&& d==3&& e==4)|| (a==2&& b==4&& c==3&& d==5&& e==1)|| (a==3&& b==5&& c==1&& d==2&& e==4)||
        (a==2&& b==5&& c==3&& d==1&& e==4)|| (a==2&& b==5&& c==4&& d==3&& e==1)|| (a==3&& b==5&& c==2&& d==1&& e==4)||
        (a==2&& b==1&& c==4&& d==5&& e==3)|| (a==2&& b==5&& c==3&& d==4&& e==1)|| (a==3&& b==2&& c==5&& d==1&& e==4)||
        (a==2&& b==1&& c==5&& d==4&& e==3)|| (a==3&& b==1&& c==2&& d==4&& e==5)|| (a==3&& b==2&& c==1&& d==5&& e==4)||
        (a==2&& b==4&& c==5&& d==1&& e==3)|| (a==3&& b==1&& c==4&& d==2&& e==5)|| (a==3&& b==1&& c==4&& d==5&& e==2)||
        (a==2&& b==5&& c==4&& d==1&& e==3)|| (a==3&& b==2&& c==4&& d==1&& e==5)|| (a==3&& b==1&& c==5&& d==4&& e==2)||
        (a==2&& b==5&& c==1&& d==4&& e==3)|| (a==3&& b==2&& c==1&& d==4&& e==5)|| (a==3&& b==4&& c==5&& d==1&& e==2)||
        (a==2&& b==4&& c==1&& d==5&& e==3)|| (a==3&& b==4&& c==1&& d==2&& e==5)|| (a==3&& b==4&& c==1&& d==5&& e==2)||
        (a==2&& b==3&& c==4&& d==5&& e==1)|| (a==3&& b==4&& c==2&& d==1&& e==5)|| (a==3&& b==5&& c==1&& d==4&& e==2)||
        (a==2&& b==3&& c==5&& d==4&& e==1)|| (a==3&& b==1&& c==2&& d==5&& e==4)|| (a==3&& b==5&& c==4&& d==1&& e==2)||
        
        
        (a==3&& b==2&& c==4&& d==5&& e==1)|| (a==4&& b==3&& c==2&& d==1&& e==5)|| (a==4&& b==5&& c==1&& d==3&& e==2)||
        (a==3&& b==2&& c==5&& d==4&& e==1)|| (a==4&& b==1&& c==2&& d==5&& e==3)|| (a==4&& b==5&& c==3&& d==1&& e==2)||
        (a==3&& b==4&& c==5&& d==2&& e==1)|| (a==4&& b==1&& c==5&& d==2&& e==3)|| (a==4&& b==2&& c==3&& d==5&& e==1)||
        (a==3&& b==4&& c==2&& d==5&& e==1)|| (a==4&& b==2&& c==1&& d==5&& e==3)|| (a==4&& b==2&& c==5&& d==3&& e==1)||
        (a==3&& b==5&& c==2&& d==4&& e==1)|| (a==4&& b==2&& c==5&& d==1&& e==3)|| (a==4&& b==3&& c==5&& d==2&& e==1)||
        (a==3&& b==5&& c==4&& d==2&& e==1)|| (a==4&& b==5&& c==1&& d==2&& e==3)|| (a==4&& b==3&& c==2&& d==5&& e==1)||
        (a==4&& b==1&& c==2&& d==3&& e==5)|| (a==4&& b==5&& c==2&& d==1&& e==3)|| (a==4&& b==5&& c==2&& d==3&& e==1)||
        (a==4&& b==1&& c==3&& d==2&& e==5)|| (a==4&& b==1&& c==3&& d==5&& e==2)|| (a==4&& b==5&& c==3&& d==2&& e==1)||
        (a==4&& b==2&& c==1&& d==3&& e==5)|| (a==4&& b==1&& c==5&& d==3&& e==2)|| (a==5&& b==1&& c==2&& d==3&& e==4)||
        (a==4&& b==2&& c==3&& d==1&& e==5)|| (a==4&& b==3&& c==1&& d==5&& e==2)|| (a==5&& b==1&& c==3&& d==2&& e==4)||
        (a==4&& b==3&& c==1&& d==2&& e==5)|| (a==4&& b==3&& c==5&& d==1&& e==2)|| (a==5&& b==2&& c==1&& d==3&& e==4)||
        
        
        (a==5&& b==2&& c==3&& d==1&& e==4)|| (a==5&& b==3&& c==1&& d==4&& e==2)|| 
        (a==5&& b==3&& c==1&& d==2&& e==4)|| (a==5&& b==3&& c==4&& d==1&& e==2)|| 
        (a==5&& b==3&& c==2&& d==1&& e==4)|| (a==5&& b==4&& c==1&& d==3&& e==2)|| 
        (a==5&& b==1&& c==2&& d==4&& e==3)|| (a==5&& b==4&& c==3&& d==1&& e==2)|| 
        (a==5&& b==1&& c==4&& d==2&& e==3)|| (a==5&& b==2&& c==3&& d==4&& e==1)|| 
        (a==5&& b==2&& c==1&& d==4&& e==3)|| (a==5&& b==2&& c==4&& d==3&& e==1)|| 
        (a==5&& b==2&& c==4&& d==1&& e==3)|| (a==5&& b==3&& c==2&& d==4&& e==1)|| 
        (a==5&& b==4&& c==1&& d==2&& e==3)|| (a==5&& b==3&& c==4&& d==2&& e==1)|| 
        (a==5&& b==4&& c==2&& d==1&& e==3)|| (a==5&& b==4&& c==2&& d==3&& e==1)|| 
        (a==5&& b==1&& c==3&& d==4&& e==2)|| (a==5&& b==4&& c==3&& d==2&& e==1)||
        (a==5&& b==1&& c==4&& d==3&& e==2)) 

	          
 
niktron:
Maybe someone could use variants with mismatched values from 1 to 5... Oh, and if anyone sees a mistake, history won't forget you!:)

Your idea?! Create! You've got your whole life ahead of you!
 
borilunad:

Your idea?! Create! You have your whole life ahead of you!

You have to pay for the loan:)