oh, I change AtrPeriod from 14 to 1, in the actual mt4 when I set the custom indicator onto the chart
niko:
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
First of all, those who can code mql deserve a lot of respect!!
I have spent months learning mql and apart from being able to code in prorealtime (which isn't really coding) I got pretty much nowhere with mql. I watched videos, made notes, but didn't really get anywhere, its very hard as all tutorials (on basic, c+) seem to be totally withdrawn from practical side of things : (
<CODE DELETED>
sorry, done, its been a few years since I posted here : )
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
First of all, those who can code mql deserve a lot of respect!!
I have spent months learning mql and apart from being able to code in prorealtime (which isn't really coding) I got pretty much nowhere with mql. I watched videos, made notes, but didn't really get anywhere, its very hard as all tutorials (on basic, c+) seem to be totally withdrawn from practical side of things : (
So here I am appealing for a bit of help.
Basically, I have 13 different charts running on my screen (all 1hr pairs) and what I need is for this to happen:
1. When new 1hr bar opens (i.e. at the hour, eg: 09.00, 10.00, etc), mql checks the previous bar and checks to see if it's true range (high-low) is below the last X number of bar's true ranges (eg: if it is below 10 last bars for example). So I am looking for basically NR4 or NR7 if you are familiar with that set up (a narrow range bar). If the true range for last hour's bar is indeed lowest in last X number of bars then the computer to do an sound ALARM, and that's it.
Right now I am doing this visually and it means checking the screens myself every single hour, which is a nightmare as its a 24hr process.
Ideally, if it is possible to incorporate the alarm function and check into the code below, somehow. I simply took the typical ATR code and changed the graph type of indicator to HISTOGRAM (so its easier to spot if the last hour bar is indeed lowest range). So I only use 1 custom indicator and it is below. If someone could incorporate the above paramter for an alarm into that code below (if that is reasonable) then I'd at least learn a bit more mql myself as well as have that functionality : ) . If not, then any other solution is welcomed : )
--------------------------------