Hi forum!
I started learning MQL4 now but it's not easy at the beginning. I am not a programmer, the syntax seems to be pretty complex for me. Therefore I want to know if somebody could give me a very short code just for my orientation. The indicator should only place horizantelly in a window and draw instantly: firstly (Price-lowest of the current day)/ATR of the day before, secondly, (Highest of the current day-Price)/ATR of the day before, and finally, (Highest of the current day-Lowest of the current day)/ATR of the day before. That's all. I only want to know how a good programmed code looks like. Then I can use this small code to keep on learning and testing. But at the moment I don't even know how to create a structure in the Metaeditor. I only wrote down // My first MQL4 try... And that's not enough... ;-)
Thank you very much!
Hello,
perhaps this helps. Furthermore:
- See the tutorials and examples.
- Get a book on C programming; you can put this search on the google - "C for dummies" filetype:pdf - and download the link of the first result.
for the indicator:
1 - save the indicator in folder C:\interbankfx4\experts\indicators (or similar place in our pc).
2 - open metaeditor and compile it.
3- put in a chart and see the effect (you might need to wait for a tick from terminal for the last value to refresh, and whole chart adjustes).
it might not be what you want, but gives you a start.
start from there... if you run into trouble; ask a direct question on this forum, with a clear code example.
Russell
Hello,
perhaps this helps. Furthermore:
- See the tutorials and examples.
- Get a book on C programming; you can put this search on the google - "C for dummies" filetype:pdf - and download the link of the first result.
for the indicator:
1 - save the indicator in folder C:\interbankfx4\experts\indicators (or similar place in our pc).
2 - open metaeditor and compile it.
3- put in a chart and see the effect (you might need to wait for a tick from terminal for the last value to refresh, and whole chart adjustes).
it might not be what you want, but gives you a start.
Thanks for the help and for the indicator, but didn't understood what the meaning of?
Thanks for the help and for the indicator, but didn't understood what the meaning of?
use this version instead. It is more correct version as close of current day is the ask/bid price: Ask is same as Close[0].
here is attached correct version.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I started learning MQL4 now but it's not easy at the beginning. I am not a programmer, the syntax seems to be pretty complex for me. Therefore I want to know if somebody could give me a very short code just for my orientation. The indicator should only place horizantelly in a window and draw instantly: firstly (Price-lowest of the current day)/ATR of the day before, secondly, (Highest of the current day-Price)/ATR of the day before, and finally, (Highest of the current day-Lowest of the current day)/ATR of the day before. That's all. I only want to know how a good programmed code looks like. Then I can use this small code to keep on learning and testing. But at the moment I don't even know how to create a structure in the Metaeditor. I only wrote down // My first MQL4 try... And that's not enough... ;-)
Thank you very much!