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
The IIFc() function.
A very handy function in terms of constructing forks. If so, this colour. And if it is not, then another colour. Function IIFc() takes three mandatory parameters:
The IIFd() function.
Similar convenience for real numbers. If so, such a real number. If it is not, then another number. The IIFd() function takes three mandatory parameters:
The IIFi() function.
Similar convenience for integers. If so, such an integer. If not, then another number. The IIFi() function takes three mandatory parameters:
IIFs() function.
Similar convenience for strings. If so, such a string. If not, then another string. The IIFs() function takes three mandatory parameters:
Example of using the IIFc() function.
If the given price level is higher than the current Bid, then set a horizontal line at the given price level in blue, otherwise in red.
Without use of IIFc() function the above code would look as follows:
P.S. Attached is a script to test the IIFc() function.
Example of using the IIFs() function.
The IIFs() function is, in most cases, used in the commenting block of the EA operation. For example, it is used when outputting values of external parameters of the EA.
P.S. Attached is a script to test the IIFs() function.
An example of the use of the IIFd() function.
It is convenient to use IIFd() function when initializing some variables. For example, price levels of stop and take before opening a position.
Without the IIFd() function, this code would look as follows:
Example of using trading functions in the tester.
To show how trading functions intended for use in the tester only can be applied, I wrote e_ForTester, a swing Expert Advisor. The entry signal is a pair of unidirectional candlesticks. If the candlesticks are directed upwards, the EA closes the buy and sells. If the candlesticks are directed downwards, the Expert Advisor closes the sale and buys. There is only one position in the market at all times. Exit is either by the opposite signal, or by a stop/stop/stick. Stop and Take are two external parameters that can be optimized.
The following tester-only functions are used in the EA:
Trades of the e_ForTester Expert Advisor on the EURUSD H1 chart:
P.S. Attached: