• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:42am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:42am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Ea trigger be+at x price drag line 0 replies

My way of trading by Using trend line , BL line & febo level 76 replies

Searching script: Drag and Drop H-line (with predefined description) 10 replies

Drag and Drop SL TP 49 replies

Drag and Drop alerts 4 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 19
Attachments: Alerts using drag and drop of line
Exit Attachments
Tags: Alerts using drag and drop of line
Cancel

Alerts using drag and drop of line

  • Last Post
  •  
  • Page 1 2 3
  • Page 1 2 3
  •  
  • Post #1
  • Quote
  • First Post: Edited 1:19pm Mar 3, 2011 12:57pm | Edited 1:19pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
I use MT4 for one broker, and I usually have several alerts going for prices on various TF on 2-3 currency pairs. This can get very unwiedly fast and takes a while to populate the ALERTS section in MT4 since I make the changes daily; 10-20 approximately. I am hoping that there is a custom indicator that allows me to just "drop" the horizontal line which I can move/adjust to the proper price level and have an email alert when that price is reached. Is there such an indicator asides from what MT4 provides? This would make it so much faster and streamlined. Thank you for any assistance.

UPDATE: I found the Horizontal Line indicator, but it does not have email option.
  • Post #2
  • Quote
  • Edited 2:32pm Mar 3, 2011 1:41pm | Edited 2:32pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Append the text Alert_xxx to the object's description. Then (after you've attached the indy to your chart) when the bid price gets to within xxx pips of the object, the alert will trigger, and the text Alert_xxx will be removed from the description, ensuring that the alert occurs once only (per object). Each object may be either a trendline or a horizontal line.

You can change the Signature string to anything you wish. For example, if instead of using Alert_xxx you'd like to simply type ~xxx (less keystrokes), then set Signature = ~ (see screenshot below)

The alert, when triggered, will be transmitted as follows:

--- If ScreenAlert = true, the standard MT4 alert will sound/display.

--- If EmailSubject is non-blank, then an e-mail will be sent provided that the e-mail facilities in MT4 have been configured correctly (e.g. see here and here).

[EDIT]

NOTES:

1. The alert's output text is "[currency pair],[timeframe]: [object name] - [object description]". This text is also sent to the 'body' of the e-mail.

2. You need to attach the indy only once per chart, even if you have multiple objects to send alerts at different price levels on the same chart. Each object must include the same Signature token, but may otherwise have a different name, description, and number of pips following the signature.

3. Credit where credit's due: this indy was based on Tesla's original idea here.

4. Fixed bug where signature was not being removed if it was the only text present in the object description.

MT4 aptitude test: BTW, can anybody see anything unusual in the screenshot?
Attached Image (click to enlarge)
Click to Enlarge

Name: pinoyboy1.JPG
Size: 109 KB
Attached File(s)
File Type: mq4 Alerter 2.mq4   74 KB | 3,159 downloads
 
 
  • Post #3
  • Quote
  • Mar 3, 2011 2:17pm Mar 3, 2011 2:17pm
  •  Yoenes
  • | Joined Jan 2010 | Status: Member | 256 Posts
Quoting hanover
Disliked
Append the text Alert_xxx to the object's description. Then (after you've attached the indy to your chart) when price gets to within xxx pips of the object, the alert will trigger, and the text Alert_xxx will be removed from the description, ensuring that the alert occurs once only (per object). Each object may be either a trendline or a horizontal line.

You can change the Signature string to anything you wish. For example, if instead of using Alert_xxx you'd like to simply type ~xxx (less keystrokes),...
Ignored
Hello Hanovar

Nice indicator.


but i m looking if we can create one indicator that trail the stop below the trendline for longs and above the trendline for shorts.


It is just if we are long and we can draw a trendline and and the stop should be trailed till that tendline breaks it can ulso be a few pips below the trendline that should be ok.


So it will be fine if you can create some think like that.


Thanks,
Yoenes
 
 
  • Post #4
  • Quote
  • Edited 2:36pm Mar 3, 2011 2:24pm | Edited 2:36pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
Hi Hanover,

Thanks for quick reply. Could you please validate why I do not see the Horizontal Line when I drag the Alerter 2 on the chart? I have the first screen shot of the window you have (attached screenshot of what I do not see), but I do not see the properties for that second window below that you have. How do I access that property?
Attached Image
 
 
  • Post #5
  • Quote
  • Mar 3, 2011 2:42pm Mar 3, 2011 2:42pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting pinoyboy
Disliked
Hi Hanover,

Thanks for quick reply. Could you please validate why I do not see the Horizontal Line when I drag the Alerter 2 on the chart? I have the first screen shot of the window you have, but I do not see the properties for that second window below that you have. How do I access that property?
Ignored
The premise behind Tesla's original indicator was that the trader wanted to be alerted when price got near to trendlines (or horizontal lines) that he'd already drawn on his chart.

Hence you must create the line(s) manually yourself, and then edit their properties to set up the signature. That way, you can have multiple lines (so that you can be alerted when price reaches different levels) while needing only one instance of Alerter2 on your chart. See note 2 in my original post.

I could write a separate script to create a horizontal line, but I don't see any point in doing so, because it would be just as easy to create the line using MT4's toolbar as it would be to drag the script onto your chart, and then move the line to your desired location.
 
 
  • Post #6
  • Quote
  • Mar 3, 2011 2:47pm Mar 3, 2011 2:47pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting Yoenes
Disliked
Hello Hanovar

Nice indicator..........
Ignored
Sorry, but that is a facility that's available in a commercial product that I'm in the process of releasing (here).
 
 
  • Post #7
  • Quote
  • Mar 3, 2011 2:51pm Mar 3, 2011 2:51pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
I see, I thought what you provided was a TRENDLINE / ALERTER which had all the facilities. With this method, it's more work actually than MT4 Alert. I have to put the TRENDLINE Indicator down, and then manually apply the ALERTER indicator for that window - two steps and numerous windows. I'll see what I can do here, thank you.
 
 
  • Post #8
  • Quote
  • Edited 4:17pm Mar 3, 2011 3:31pm | Edited 4:17pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting pinoyboy
Disliked
I see, I thought what you provided was a TRENDLINE / ALERTER which had all the facilities. With this method, it's more work actually than MT4 Alert. I have to put the TRENDLINE Indicator down, and then manually apply the ALERTER indicator for that window - two steps and numerous windows. I'll see what I can do here, thank you.
Ignored
OK, try the attached.

To anybody who wants the indy to work the way it did before, leave NumberOfPips set to -1. The other parameter settings are explained in post #2.

However, if you want the indy to create the line for you, set NumberOfPips to a zero or positive value.

Then the indy (assuming it's being attached to the chart) will plot a line with the signature string automatically set up, and to the number of pips that you specified. Simply drag the line to the desired point on your chart, and you're good to go.

LineColor sets the color of the line. ObjectDescr (optional) sets its description (with the Signature and NumberOfPips automatically appended).

If you need multiple lines (different alert levels) on the same chart, then simply edit the indy's properties, and it will automatically create another line for you. Or, alternatively, simply duplicate the line (select it, and drag it with the Ctrl key held down). Either way, you only need one instance of Alerter2 per chart, even for multiple lines. The lines can be different LineColors, have different ObjectDescrs and a different NumberOfPips, but all must use the same Signature.

When an alert gets triggered, then (if NumberOfPips was set >= 0), the line is automatically deleted.

If you remove the indy from the chart, any 'unused' lines should be removed also.

Note: This is probably better than using MT4 alerts, as (1) you don't need to worry about type in a price (just move the line to your desired level), and (2) I don't think the MT4 alerts has an e-mail facility.

Given the capabilities of MQL4, that's about the best that I can do. Now I'm off to do some real work.
Attached File(s)
File Type: mq4 Alerter 2.mq4   75 KB | 1,704 downloads
 
 
  • Post #9
  • Quote
  • Mar 3, 2011 4:08pm Mar 3, 2011 4:08pm
  •  Yoenes
  • | Joined Jan 2010 | Status: Member | 256 Posts
Quoting hanover
Disliked
Sorry, but that is a facility that's available in a commercial product that I'm in the process of releasing (here).
Ignored
Hello Hanover

Can you please tell me where i can buy it this indicator?

Thanks,
Yoenes
 
 
  • Post #10
  • Quote
  • Mar 3, 2011 4:19pm Mar 3, 2011 4:19pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting Yoenes
Disliked
Hello Hanover

Can you please tell me where i can buy it this indicator?

Thanks,
Yoenes
Ignored
Check the link that I provided. The product is due for release this coming Monday (March 7th). I suggest you take advantage of any trial period, to ensure that it fully meets your expectations, before you part with any money. I want all buyers to be happy with their purchase.
 
 
  • Post #11
  • Quote
  • Mar 3, 2011 5:58pm Mar 3, 2011 5:58pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
Hanover, thanks for your assistance in this. This last one is what works fine. Just a question though, is there a setting I am missing that allows me to be notified more than once like MT4 Alert does?
 
 
  • Post #12
  • Quote
  • Mar 3, 2011 6:01pm Mar 3, 2011 6:01pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting pinoyboy
Disliked
Hanover, thanks for your assistance in this. This last one is what works fine. Just a question though, is there a setting I am missing that allows me to be notified more than once like MT4 Alert does?
Ignored
No, sorry, there's not.
 
 
  • Post #13
  • Quote
  • Mar 3, 2011 6:14pm Mar 3, 2011 6:14pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
This is really nice Hanover!
 
 
  • Post #14
  • Quote
  • Mar 22, 2011 4:30pm Mar 22, 2011 4:30pm
  •  Hodgires
  • | Joined Jul 2010 | Status: Member | 75 Posts
Hi Hanover, thanx for sharing, this indi is very useful. However, is it also possible to have the alert signal after the horizonal line..for example: x pips after the line? Your help will be highly appreciated. Thanx
 
 
  • Post #15
  • Quote
  • Mar 22, 2011 6:07pm Mar 22, 2011 6:07pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting Hodgires
Disliked
Hi Hanover, thanx for sharing, this indi is very useful. However, is it also possible to have the alert signal after the horizonal line..for example: x pips after the line? Your help will be highly appreciated. Thanx
Ignored
What do you mean by "after"? Do you mean
(1) after it has passed through the line, and then traveled on a further X pips in the same direction, or
(2) if it touches or breaks through the line, and then bounces back in the opposite direction by X pips, or
(3) something else?

If (1), you could simply move the line (or create a second line) X pips further away.

If (2), it's not necessarily that simple, e.g. you'd need to specify a maximum breakthrough amount, otherwise price could, as an extreme example, reach the line and continue on through for several hundred pips, and then bounce back through it several days later. Or it could pass through and/or bounce around either side of the line several times. All of this would add to the complexity of the programming, and I sense that this could be one of those jobs that could take several attempts to get it right....... so I think I'll pass on this one.
 
 
  • Post #16
  • Quote
  • Mar 23, 2011 9:56am Mar 23, 2011 9:56am
  •  Hodgires
  • | Joined Jul 2010 | Status: Member | 75 Posts
Hanover thanx for the prompt reply, i was refering to #1 in your answer. Your suggestion is good to draw another line. But in that case the new line would have to signal with a different sound so i will know the criteria has been met as i trade 5 pairs. Will it be possible with this indi to assign a different sound alert for the second line?
 
 
  • Post #17
  • Quote
  • Mar 26, 2011 9:10am Mar 26, 2011 9:10am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting Hodgires
Disliked
Hanover thanx for the prompt reply, i was refering to #1 in your answer. Your suggestion is good to draw another line. But in that case the new line would have to signal with a different sound so i will know the criteria has been met as i trade 5 pairs. Will it be possible with this indi to assign a different sound alert for the second line?
Ignored
What I meant was that only the second line would need to have the signature in the object description that's needed to generate the alert. That assumes that you don't want to be alerted twice, i.e. when price reaches the first line, and then again at the second line.

You can change the wave file used for alerts, by pressing Ctrl-O and changing the Alerts setting on the Events tab. But this applies to all alerts, i.e. it's not possible to have different sounds for different alerts.

However, I guess it would be possible to set this value to a silent .wav file, and then code the indy to play a .wav file for each different type of alert.
___________________________

[EDIT]
I've recoded the attached indy to do this. It will now generate the standard screen Alert. Then, if you set the WaveFilename parameter to a non-blank value (e.g. Mysound.wav), it will additionally play Mysound.wav whenever the alert is triggered.

This means that you'd need to:

1. Download the attached indy into ..../[MT4]/experts/indicators, and either compile it or re-start MT4.

2. Press Ctrl-O and change the Alerts setting on the Events tab to a filename that doesn't exist. This will shut off the familiar chime that occurs when the Alert window pops up.

3. Install new wave files into the ...../[MT4]/sounds folder. You could either create these files using a suitable product (if you don't want to buy something like Camtasia Studio, then Google "free .wav editor"), or download them from a website like those listed here. Or you could simply re-use some of MT4's existing sounds (connect.wav, disconnect.wav, ok.wav, etc).

4. Attach the indy to your chart. Set its ScreenAlert parameter to TRUE, and the WaveFilename parameter to the name of a wave file that you installed in the previous step (e.g. MySound.wav). Obviously you need to get the spelling, punctuation, etc of the filename exactly correct. Then repeat this process; each time you attach the indy to a different pair, you'd specify a different WaveFilename, to get a different sound for each pair.

Hope that makes sense.

David
Attached File(s)
File Type: mq4 Alerter 2.mq4   76 KB | 871 downloads
 
 
  • Post #18
  • Quote
  • Mar 26, 2011 6:27pm Mar 26, 2011 6:27pm
  •  pinoyboy
  • | Joined Apr 2010 | Status: forexmagnate.wordpress.co m | 209 Posts
David, when I used your Alerter2, and then switch between various time frames in which the Alerter2 is attched to, it creates multiple Alerter lines.

To test, attach the Alerter2 indi on 1 HR window, then switch that window to 4HR, DAILY, 5M, etc and you will see multiple lines drawn all the sudden. Is there a setting I am getting wrong?
Attached Image (click to enlarge)
Click to Enlarge

Name: 3-26-2011 5-24-17 PM.gif
Size: 20 KB
Attached Image
 
 
  • Post #19
  • Quote
  • Mar 27, 2011 12:40am Mar 27, 2011 12:40am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting pinoyboy
Disliked
David, when I used your Alerter2, and then switch between various time frames in which the Alerter2 is attched to, it creates multiple Alerter lines.
Ignored
You're correct.

It's because every time you change TFs, all indys reset themselves, which is effectively the same as re-attaching the indy to a chart. That is the way MT4 works.

And of course every time you 'attach' this indy, with the NumberOfPips set >= 0, it will create a new line. Hence one way to get around the problem would be to set NumberOfPips to -1, before changing TF.

However, I will try to think of a better solution.
 
 
  • Post #20
  • Quote
  • Mar 27, 2011 1:40am Mar 27, 2011 1:40am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,092 Posts
Quoting pinoyboy
Disliked
David, when I used your Alerter2, and then switch between various time frames in which the Alerter2 is attched to, it creates multiple Alerter lines.

To test, attach the Alerter2 indi on 1 HR window, then switch that window to 4HR, DAILY, 5M, etc and you will see multiple lines drawn all the sudden. Is there a setting I am getting wrong?
Ignored
Try the attached version. Hopefully fixes the problem.
Attached File(s)
File Type: mq4 Alerter 2.mq4   76 KB | 2,029 downloads
 
 
  • Platform Tech
  • /
  • Alerts using drag and drop of line
  • Reply to Thread
    • Page 1 2 3
    • Page 1 2 3
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023