First some disclaimers:
- My MQL4 coding experience is limited to cannibalizing bits and pieces of other peoples' code for use in my own little indicators. Somehow this has worked for me for the past 5 years or so.
- I have never coded C/C++, which I understand is similar to MQL5. The only language I was ever proficient in was Tradestation's EasyLanguage back in the day.
I'm trying to get my head around coding for MQL5, and need help to convert the attached sample MQL4 indicator to MQL5 as a starting point for me in the learning process.
All the indicator does is the following:
- print the number of minutes of each timeframe in the top left hand corner of the chart e.g. in the Daily chart it will print 1440, in the H4 chart 240 etc etc.
- print an arbitrary historical reference price in the bottom left corner of the chart for the currency pair I'm looking at. e.g. for USDJPY it will print 100, for EURUSD 1.2000. All these levels are already arbitrarily fixed in the body of the code itself, so there's no calculation at all.
All in all, a pretty stupid (but little and simple enough) indicator I've cooked up. But it's my first tiny step in understanding MQL5.
The code compiles easily in the latest MT4 updates. I just need a working MT5 version that compiles fully, error-free and if possible, warning-free as well.
Yes I know there are "better" ways of learning a new language, but would appreciate you could just humor me with my humble request!
Many thanks in advance!
Cheers!
Skenobi
Attached File(s)
TF label.mq4
4 KB
|
1,048 downloads
I'm not trying to convince anyone. I'm not in the "convincing" business.