|
Convert this MT3 into MT4 for me - very easy
I'm considering switching from MT4 to MT3.
I've just finished editing my very first expert advisor.
It took me about 4 weeks to learn enough about MT and MQL4 to finally get my strategy programmed, but now I think I might just convert the program to MQL2.
From what I've read on this forum, I don't see any advantages to MT4.
What I have read, and learned through backtesting my EA, is that the MT4 Strategy Tester does not work. For this reason alone, I think it only makes sense to spend a few more days making the switch so that I can get an accurate backtest with MT3.
I've already downloaded and installed MT3 and taken a look at the editor dictionary. I can see that there are fewer features with MT3 than with MT4, but I don't think that will be a major problem.
One feature of my MQL4 EA that I was relying on heavily, was the OrderMagicNumber for storing the original pending order's price, which can change with slippage when the order is filled.
MQL2 orders don't have OrderMagicNumber, but I did notice in the MQL2 dictionary a function called OrderValue which, in its description, says the function can retrieve an order's comment (VAL_COMMENT).
If I can use the comment to store the prefered price, I think I can make the switch to MT3. However, I was not able to find in the dictionary, how to set the order comment. The SetOrder function description does not list "comment" as one of its parameters.
Can anyone familiar with this feature of MQL2 tell me how the order comment is set?
|