Forum

params arguments

Hi, I can't seem to find an example of defining a function with an arbitrary set of parameters, just like Print(...) is defined. How do I go about declaring and then accessing a parameters array? A code example, or a link to a documentation would be greatly appreciated, Thank you

suppress modify notification messages

Hi, I'm working on an EA and I'm implementing a trailing stop loss , since neither MT4 nor my broker supports that feature out of the box, I have to implement it programmatically by modifying a SL closer all the time. That leads to a lot of Modify calls per order. When I'm trying to use a tester to

Calculating profit with a given price

Hi, I'm trying to write a function in MQL4 which will calculate my total profit (could be negative, which would mean loss) at a given price. In other words, if I have an open Buy order at price P1 then: my profit at P2 would be ((P2-P1) * volume) - but that's in most simplistic terms, now I need to