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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

MT4 - Terminal window in separate window? 24 replies

ADR line in separate window 4 replies

Force a separate window type indicator to appear on main chart 4 replies

Fib indicator in separate window 0 replies

Stoch window above price window/ separate price indicator? 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: Is a horizontal line indicator with alarm on separate window possible?
Exit Attachments

Is a horizontal line indicator with alarm on separate window possible?

  • Post #1
  • Quote
  • First Post: Sep 13, 2010 5:16am Sep 13, 2010 5:16am
  •  trade4fun
  • | Commercial Member | Joined May 2010 | 382 Posts
just wondering.

if this has ever be done.

while there are indicators like H-line were you can add a horizontal line on the chart with an alarm.

as far as i know there is no custom horizontal line indicator with alarm that you can add on a seperate window.

my idea is simple. excecution maybe difficult.

what i like to do, is add an custom horizontal line as shown in the picture on a seperate chart window where an indicator is added. in this example of ADX. whatever line hits the custom horizonal line, it should give an alarm.

now the main difference between a horizontal line on main chart window or seperate window, is that the values of a seperate window change.

ADx indicator has different values then RSI , RSI has different ones then MACD etc.

now the standard horizontal lines you draw in metatrader, they automaticly take over the values of what indicator is on the seperate windows chart.

however if one would need to program one with an alarm. how would you make the code in such a way that it would obtain those custom values?

and if such an indicator is already programmed. could someone share it with me, because i dont like to re invent the wheel.

thanks in advance.
Attached Image (click to enlarge)
Click to Enlarge

Name: custom-redline.gif
Size: 24 KB
  • Post #2
  • Quote
  • Sep 13, 2010 5:31am Sep 13, 2010 5:31am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
I suggest modifying the Alerter.mq4 for this and making it an official part of it. Alerter is one of the better alert indicators, does already provide some of the needed infrastructure and giving it this additional ability would make it even more versatile.

Edit: The main problem will be getting the current value of the indicator buffer (which one?) from the foreign indicator. Not so easy.
  • Post #3
  • Quote
  • Sep 13, 2010 6:47am Sep 13, 2010 6:47am
  •  trade4fun
  • | Commercial Member | Joined May 2010 | 382 Posts
7bit,

that is why i was thinking, have the line indicator check for all buffers. once it hits the buffer the horizontal line is set on, give alarm?

i also checked alerter, but as we know it only works for main chart.
  • Post #4
  • Quote
  • Sep 13, 2010 7:08am Sep 13, 2010 7:08am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting trade4fun
Disliked
that is why i was thinking, have the line indicator check for all buffers.
Ignored
You cannot directly access the buffers if you don't load it with iCustom() and you cannot use iCustom() to dynamically load any arbitrary indicator with a different number of parameters at runtime. Making this all work somehow would require some really creative hacks. Maybe using the windows API to directly search for certain pixels on the screen would be a possible approach, but only if the window is currently visible.
  • Post #5
  • Quote
  • Sep 13, 2010 9:27am Sep 13, 2010 9:27am
  •  trade4fun
  • | Commercial Member | Joined May 2010 | 382 Posts
that is far beyond my capabilities for sure.

would it not be possible to load icustom in objects?

lets say something like this.

ObjectCreate(icustom="indicator"...,0,1);

and repeat that 8 times to check for all the buffers?

you might end up with 8 horizontal lines. but if you position them all at the same point, then would it matter?
  • Post #6
  • Quote
  • Sep 13, 2010 9:37am Sep 13, 2010 9:37am
  •  7bit
  • Joined Mar 2009 | Status: Member | 1,231 Posts
Quoting trade4fun
Disliked
ObjectCreate(icustom="indicator"...,0,1);
Ignored
No, I dont see any possibility to use iCustom because you don't know all the needed parameters and their type at runtime to load the manually added indicator a second time through iCustom with the exact same parameters.

I have another idea: The data window can be set to always show the current bar and it will show the contents of all buffers of all attached indicators. It seems to be based on an ordinary listview, maybe this can be used to grab the current buffer values somehow.

Edit: foget it, it wont update without moving the mouse over the chart. You would have to send fake mouse events to the chart also. Too ugly.
  • Post #7
  • Quote
  • Last Post: Sep 13, 2010 9:42am Sep 13, 2010 9:42am
  •  trade4fun
  • | Commercial Member | Joined May 2010 | 382 Posts
heh,

still far away from my capabilities. ideas is nice though.

i am a a rookie mq4 programmer. at least i understand why it has not been done before. at least that part is answered.
  • Platform Tech
  • /
  • Is a horizontal line indicator with alarm on separate window possible?
  • Reply to Thread
0 traders viewing now
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 / ©2021