| / | Forum |
|
karan
2006.04.21 20:49
I know C/C++ and find the syntax of MQL4 to be compatible with C, However there
are annoying differences such as not being able to do a pre decrement operator
(--pos), etc.
How do you pass arguments to functions that modify the arguments. In C you can use pointers and in C++ you can additionally use a ref type. Is there any equivalent in MQL4? |
|
A Pattern Trailing Stop and Exit the Market Developers of order modification/closing algorithms suffer from an imperishable woe - how to compare results obtained by different methods? The mechanism of checking is well known - it is Strategy Tester. But how to make an EA to work equally for opening/closing orders? The article describes a tool that provides strong repetition of order openings that allows us to maintain a mathematically correct platform to compare the results of different algorithms for trailing stops and for exiting the market. |
|
CockeyedCowboy
2006.04.22 03:23
karan: use the '&' symbol in your parameter descriptions at the function level. ExampleI know C/C++ and find the syntax of MQL4 to be compatible with C, However there are annoying differences such as not being able to do a pre decrement operator (--pos), etc. How do you pass arguments to functions that modify the arguments. In C you can use pointers and in C++ you can additionally use a ref type. Is there any equivalent in MQL4? void MyFunction( int& count ) { count = count + 1; return; } What ever argument you pass this function it will get incrimented by one. |
|
karan
2006.04.22 05:17
use the '&' symbol in your parameter descriptions at the function level. Example void MyFunction( int& count ) { count = count + 1; return; } What ever argument you pass this function it will get incrimented by one. |