[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 9

 
DhP:


There can be no errors in this case.

When compiling, there may only be an indication/reminder that some function is not used.

In this case, I either turn a blind eye to this, or delete this unused function.


An external file can then be used. And connect only what you need. Although who am I writing this to, I'm in the second quarter of first grade myself.)
 
tol64:

An external file can then be used. And connect only what you need. Although who am I writing about it, I'm in the second quarter of first grade myself)).

Fair enough, but I find it easier to keep everything in code.
 
DhP:

Fair enough, but I find it easier to keep everything in code.

In one code is convenient of course. Transferring/transferring a file is convenient. But if even without body functions maximal compressed code stretches to a kilometre of pages, it's very difficult to navigate in it. It's a long scroll.)))
 
tol64:

In one code is convenient of course. It is convenient to move/transfer the file. But if the maximal compressed code stretches a kilometre of pages even without body functions, it is very difficult to navigate in it. It's a long scroll.)))


No need to scroll all the way to the end of the code, if you know every function and its abilities.

Read only start(), where the order of action/work of the EA is prescribed.

 
DhP:


There is no need to scroll all the way to the end if you know each function and its abilities.

Read only start(), where the order of action/work of the EA is prescribed.


Yes, this is the most convenient method. I have only logic and comments in Start(). The bodies of all functions are moved to external files.
 

I am just learning how to write an EA, like many of my first EAs on standard indicators, I have just written a new one, but now I have complicated my task. In general, how to make, that in the emergence of conditions opened a position and when you close it, let's take the same conditions, a new do not open, and open, only when the opposite conditions, etc. Thank you!!!

 

Can you please tell me how to output the average of several pairs in the iWPR indicator? The following code does not output the result. Or if possible, please give me a hint.

   for(int i_1=limit_1; i_1>=0; i_1--)
   {
   WPR_1[i_1]=iWPR(symbol1+symbol2+symbol3+symbol4,0,period_1,i_1);
   }
 
unnnamed:

Can you please tell me how to output the average of several pairs in the iWPR indicator? The following code does not output the result. Or if possible, please give me a hint.

First, see if the symbol in the Wpr call is correct (put the cursor on iWpr and press F1). Then print or comment out the symbol,
which you have (symbol1+symbol2+symbol3+symbol4) and see if it is in terminal or in market.
Then look for the link to the example of how to get Wpr data from other pairs . https://www.mql5.com/ru/code/8432.
And you will get it.
 
Can I ask whether it is possible to set a stop loss/stake profit immediately at the opening of a position/placement of a pending order or afterwards?
 
SeALALex:

I am just learning how to write an EA, like many of my first EAs on standard indicators, I have just written a new one, but now I have complicated my task. In general, how to make, that in the emergence of conditions opened a position and when you close it, let's take the same conditions when saving the new one did not open, and opened only when the opposing conditions, etc. Thank you!!!


Alternatively, use flags. See the order of their application in the tutorial example - here - the first example on this page - callindicator.mq4.
Reason: