Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Do-it-yourself alert builder kit (https://www.forexfactory.com/showthread.php?t=299520)

hanover Jun 18, 2011 12:48am | Post# 1

Do-it-yourself alert builder kit
 
2 Attachment(s)
Deleted (code required build 509 compiler to operate correctly).
#MTF_CCI.mq4
ZeroLag MACDline.mq4

MaryJane Jun 18, 2011 1:45am | Post# 2

Woke up, got a coffee, saw this, modded my Vervoort's indy within six minutes, checked in tester, works like charm.

David, this is great! Thank You

johnsund Jun 18, 2011 7:06am | Post# 3

David - This is a non-coders dream!!!! Thanks - as always.

Poocher Jul 4, 2011 7:50pm | Post# 4

Thanks Hanover

hanover Jul 4, 2011 9:33pm | Post# 5

Bug fix
 
Bug fix

If you're planning on using AlertCandle = 0, there was a bug in Section 3 of the code which was causing alerts not to trigger if the criteria was met on subsequent visits of price into the "alert zone". This has now been fixed and re-tested, and post #1 amended accordingly. Please note that alerts will continue to trigger only once per candle, even if the alert criteria is met repeatedly while the current candle is in the process of forming.

The code has always worked 100% for AlertCandle = 1.

My apologies for any inconvenience.

David

hanover Jul 4, 2011 9:37pm | Post# 6

1 Attachment(s)
David - This is a non-coders dream!!!! Thanks - as always.
John,

Attached is the version of the SIXTHS indy that you requested. I've spent almost 2 hours testing the alerts - they should work correctly now.

David
SIXTHS 5.0.mq4

djarum11 Dec 8, 2011 3:42pm | Post# 7

Hi David, this is a great idea, thank you.

i'm using a basic indi that prints 2 S/R lines. is there a way to alert when price approaches a certain # of pips before hitting a line?

thanks.

daytrade5 Jan 31, 2012 9:24pm | Post# 8

My attempt at adding sound/email alert
 
1 Attachment(s)
Hanover.........I can't believe that I have missed one of your threads. I have a Stochastics indicator that I have been trying to add alerts to. I want an alert when Stochastics crosses and closes above the upper level i.e. 80 or crosses and closes below the lower level i.e. 20. I had zero errors after compiling the first 2 sections. I can't seem to get past the errors in the 3rd section????
PA StochasticColor.mq4

daytrade5 Jan 31, 2012 10:58pm | Post# 9

My attempt at adding sound/email alert
 
1 Attachment(s)
Hanover.........I thought that I had it. I was able to compile the indicator with zero errors however, I am not receiving the alerts. Again, what I am trying to accomplish to have the Stochastics indicator alert when it crosses and closes above the upper level i.e. 80 or crosses and closes below the lower level i.e. 20. This indicator attached is my best attempt showing zero errors.
PA StochasticColor.mq4

pah Jan 31, 2012 11:54pm | Post# 10

did you check this bit
 
Hanover.........I thought that I had it. I was able to compile the indicator with zero errors however, I am not receiving the alerts. Again, what I am trying to accomplish to have the Stochastics indicator alert when it crosses and closes above the upper level i.e. 80 or crosses and closes below the lower level i.e. 20. This indicator attached is my best attempt showing zero errors.
If you want the alerts to occur when the indy crosses a value (rather than its signal line), then simply replace the code in red typeface with the required value(s), e.g. 100 (for the crossover UP) and -100 (for the crossover DOWN)

Regards, Paul

hanover Feb 1, 2012 12:23am | Post# 11

1 Attachment(s)
Hanover.........I thought that I had it. I was able to compile the indicator with zero errors however, I am not receiving the alerts. Again, what I am trying to accomplish to have the Stochastics indicator alert when it crosses and closes above the upper level i.e. 80 or crosses and closes below the lower level i.e. 20. This indicator attached is my best attempt showing zero errors.
DT5,

Try the attached. Should alert when the solid line crosses and closes above the upper level, and/or crosses and closes below the lower level.

To ensure that it doesn't alert until after the line has closed, set AlertCandle to 1.

I haven't tested it - will leave that to you. Please advise if there are problems.

I've added a note to post #1. Due to work commitments, this is the last request that I can help with in this thread.

David
PA StochasticColor.mq4

daytrade5 Feb 1, 2012 3:29am | Post# 12

DT5,

Try the attached. Should alert when the solid line crosses and closes above the upper level, and/or crosses and closes below the lower level.

To ensure that it doesn't alert until after the line has closed, set AlertCandle to 1.

I haven't tested it - will leave that to you. Please advise if there are problems.

I've added a note to post #1. Due to work commitments, this is the last request that I can help with in this thread.

David
Thanks Hanover....It works great. I looked at your inputs compared to mine and everything makes sense.

kristjantelve Feb 1, 2012 6:04am | Post# 13

Thank you David for those great and clear instructions!
But I have a question hopefully you can answered it also. Can we in some easy way also great alerts that uses for example 3 different indicators and the alert, arrow or line appears only when all the conditions are met?

Regards

Kristjan

hanover Feb 1, 2012 6:23am | Post# 14

Thank you David for those great and clear instructions!
But I have a question hopefully you can answered it also. Can we in some easy way also great alerts that uses for example 3 different indicators and the alert, arrow or line appears only when all the conditions are met?

Regards

Kristjan
Kristjan,

From the info you've given, and assuming I understand correctly, I'd guess that this lies outside the scope of this toolkit. If the 3 indicators are all different MQ4 files, then the alerting indicator would need to call iCustom() (or use some other means) to obtain the values of at least 2 of the indicators. However, the concepts used in the toolkit could likely be extended to achieve what you're asking; MQL4 is a versatile programming language, virtually anything is possible.

As I've indicated, I'm unable to undertake complex or time consuming programming jobs myself, due to other work commitments.

David

kristjantelve Feb 1, 2012 6:37am | Post# 15

Kristjan,

From the info you've given, and assuming I understand correctly, I'd guess that this lies outside the scope of this toolkit. If the 3 indicators are all different MQ4 files, then the alerting indicator would need to call iCustom() (or use some other means) to obtain the values of at least 2 of the indicators. However, the concepts used in the toolkit could likely be extended to achieve what you're asking; MQL4 is a versatile programming language, virtually anything is possible.

As I've indicated, I'm unable to undertake complex...
Thank you for the answer. I was hoping that there is some easy way out and not to start creating new indicator but apparently not. So I will try to figure it out.

Best of luck

Kristjan

tulasi Mar 20, 2012 11:24am | Post# 16

an arrow on chart for the signal
 
hanover, i want the chart to show an arrow (below/above the alert candle)when signal is produced..how can i make that..can u pls give the code for that..
thank you

tulasi Mar 20, 2012 11:27am | Post# 17

the arrow signal
 
that will be useful for testing..and easy for the eye to catch the recent signal..

hanover Mar 20, 2012 5:07pm | Post# 18

hanover, i want the chart to show an arrow (below/above the alert candle)when signal is produced..how can i make that..can u pls give the code for that..
thank you
I agree that would be useful, but it's a completely different coding requirement, and falls outside the scope of this thread. Alerts occur in real time, arrows are plotted under past (historical) candles.

tulasi Apr 12, 2012 11:07pm | Post# 19

I agree that would be useful, but it's a completely different coding requirement, and falls outside the scope of this thread. Alerts occur in real time, arrows are plotted under past (historical) candles.
oh.. ok. any ways.. thanks for the reply hanover

Azharrahman Jul 23, 2012 9:28pm | Post# 20

Hi Hanover,

I've been trying to learn how to edit custom indicators, especially to send emails - as always your instructions are the most useful.

I basically have an idea for an EA, using MA and the Supply Demand indicator but i am lost as how to go about it. Instead i have decided to just add an email function to the SD indicator, but when i hit enter - it doesnt load. i've tried to load it from MetaEditor but got nowhere.

I just want a very basic system that would alert me when i'm not at the computer. Any ideas?

Thanks


© Forex Factory