Forex Factory
  • Login

  • Username: Password:
  • 11:48pm

  • Search
  • Home

  • Forums

  • Trades

  • Calendar

  • News

  • Market

  • Brokers

Options

Search
Search
Search

Subscribe to Thread

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

How to change timeframes in Mt4 to timeframes which are not supported (like 10 min.)? 5 replies

Is it possible to show multiple timeframes on 1 chart? 7 replies

Switching timeframes MT4 0 replies

MT4 Other Timeframes 2 replies

Q. on changing timeframes in MT4 5 replies

  • Platform Tech
  • /
  • Reply to Thread
  • 6

Program to Allow MT4 to show crosshair over different timeframes

  • Last Post
  • First Unread
  •  
  • Page 1 2
  •  
  • Post# 1
  • Quote
  • First Post: Oct 11, 2008 2:00pm
  • slim
    Joined May 2008 | 38 Posts | Status: Member
Hi there everyone.
This is my first post.

Does anyone know how to achieve the following please.

If i have say, for example, 3 timeframes up on my screens.

I would like to find a way to pull up a crosshair and hover over say a 5minute chart. But i would like to see the crosshair moving on the other timeframe charts too whilst i am moving the crosshair on the 5minute chart.

Is this possible?
Thank you in advance...
  • Post# 2
  • Quote
  • Oct 11, 2008 3:31pm
  • BenQ
    Joined Jun 2006 | 859 Posts | Status: Member
This is one of the features I missed the most when I got rid of E-signal and Tradestation. They both had what they called a global crosshair that did exactly what you describe. I used it all the time, and now often wish I could do it in MT4 but have never figured out a way.
  • Post# 3
  • Quote
  • Oct 12, 2008 11:50am
  • slim
    Joined May 2008 | 38 Posts | Status: Member
Thanks BenQ for your reply.
Do you think that this might be something that can be programmed? or, more to the point, if anyone would be willing to program something which can do this? This would be awesome. I would love to see this feature on MT4. Thanks again for your reply and all the best mate...
  • Post# 4
  • Quote
  • Oct 20, 2008 3:48pm
  • sorrex
    Joined May 2008 | 3 Posts | Status: Member
hello Slim,
I had similar problem some time ago and so I did this solution, I hope it will help you:

1. open main window and drop "@ sx BT get" script on the chart - magenta vertical line named "BT" apears at the end (this script will read time and write it to global variable)

2. open other window (for ex. other TF of the same pair) and drop "@ sx BT set" script on it - blue vertical line named "BT" apears at the end (this script will read glob. variable with time and move blue line to specific time)

3. repeat step 2 if necessary in more charts

now move magenta in main window and blue lines will move in synco with it.

when you want to stop scripts - just switch TF in the windows
Attached Files
File Type: mq4 @ sx BT get.mq4   2 KB | 592 downloads
File Type: mq4 @ sx BT set.mq4   2 KB | 564 downloads
  • Post# 5
  • Quote
  • Oct 22, 2008 12:58am
  • slim
    Joined May 2008 | 38 Posts | Status: Member
Thank you so much Sorrex - i really appreciate your wonderful and kind help on this. I am going to try this out now and post back if i have any problems. Thanks again
  • Post# 6
  • Quote
  • Oct 22, 2008 3:52am
  • slim
    Joined May 2008 | 38 Posts | Status: Member
Hi Sorrex - this is a fantastic solution thank you very much
I was wondering - did you create this script?

If so - what would the possibility be of modifying it slight so that we can group a vertical and horizontal line together, thus, creating a crosshair which can be moved around the charts instead?

I have no clues about scripts i am sorry so i would not know where to start.

Please let me know if you could help.

All the best and have a great day....
  • Post# 7
  • Quote
  • Oct 24, 2008 3:24am
  • sorrex
    Joined May 2008 | 3 Posts | Status: Member
Hi Slim,
I join a slightly modified version. It does both vertical and horizintal line. Unfortunatelly it is not possible to move both of them simultanously.

I solved exit of scripts also - you can just delete one of magenta lines in main window and it will remove lines and global variables in all windows and removes script from them. Due to this solution "BT get" script must be dropped in main window first, then "BT set" in slaves windows.

Hope it will help you any way. GL
Attached Files
File Type: mq4 @ sx BT get cross.mq4   2 KB | 633 downloads
File Type: mq4 @ sx BT set cross.mq4   2 KB | 561 downloads
  • Post# 8
  • Quote
  • Oct 24, 2008 7:03am
  • slim
    Joined May 2008 | 38 Posts | Status: Member
Wow Sorrex - what a fantastic job you have done there

That is amazing...
Thank you thank you thank you thank you )))))

Is there no way at all possible to somehow implement in the script that the vertical line and horizontal line are grouped so that it acts like a proper crosshair?

I was wondering if this was possible since you were able to implement that when the vertical line is deleted - it deletes the horizontal line too...

If this could be achieved - then you have absolutely cracked the global crosshair issue on MT4.

Honestly, i cant thank you enough for this - it really is an amazing piece of work.

THanks once again....
  • Post# 9
  • Quote
  • Oct 24, 2008 11:51am
  • sorrex
    Joined May 2008 | 3 Posts | Status: Member
hi slim,

im sorry but i have no idea how to tie both lines like a cross. I do not know function that gives actual position of cursor.

Actual script works simply: "get" reads position=time of vertical line or price at horizontal line and these values writes to global variables, that are accessable from other windows.
"set" scripts reads content of glob. variables and move lines to proper positions (price and time). No less no more. Because you are not able move both lines together you cannot work as regular crossline.

If there is some connection between line (e.g. you horizontal line = close price at the that time of vertical line) it is possible to tie lines. But it is not regular crosshair.

Im not sure if you understood what I mean, so I join another handy script for manual backtesting that works this way:

How to use: drop "manual BT" script to chart. there will be 2 vertical lines (red and blue) and 2 horizontal dashed lines. You can move vert. line to open and close order positions and hor. lines move immediatelly to close price at these times. In left up corner you can see the profit. Nothing clever but sometimes handy for backtesting. Must try and you will see.
Attached File
File Type: mq4 @ sx Manual BT.mq4   2 KB | 360 downloads
  • Post# 10
  • Quote
  • Sep 14, 2009 3:12pm
  • XXTrader
    Joined Jun 2009 | 27 Posts | Status: Member
I cannot get to work correctly. Is that an updated script for the global crosshairs for the MT4???

Quoting sorrex
hello Slim,
I had similar problem some time ago and so I did this solution, I hope it will help you:

1. open main window and drop "@ sx BT get" script on the chart - magenta vertical line named "BT" apears at the end (this script will read time and write it to global variable)

2. open other window (for ex. other TF of the same pair) and drop "@ sx BT set" script on it - blue vertical line named "BT" apears at the end (this script will read glob. variable with time and move blue line to specific time)

3. repeat step 2 if necessary in...
  • Post# 11
  • Quote
  • Oct 29, 2009 11:40pm
  • pa18
    Joined Jan 2009 | 243 Posts | Status: Member
Quoting sorrex
Hi Slim,
I join a slightly modified version. It does both vertical and horizintal line. Unfortunatelly it is not possible to move both of them simultanously.

I solved exit of scripts also - you can just delete one of magenta lines in main window and it will remove lines and global variables in all windows and removes script from them. Due to this solution "BT get" script must be dropped in main window first, then "BT set" in slaves windows.

Hope it will help you any way. GL
Hi there, is this working?? When I drop it onto my MT4 charts, it doesn't attach??
  • Post# 12
  • Quote
  • Aug 29, 2011 5:19pm
  • R2011
    Joined Aug 2011 | 4 Posts | Status: Member
The script is nice in marking the area of interest on chart with vertical line, but it does not move chart view to the marked data. It is still necessary to page through historical chart views to find the corresponding blue vertical line. So instead of searching for date and hours I only have to search for the line now.

Is there some way that chart with blue line automatically scrolls chart to the date and time with new location of blue line? This would make the script really useful.

Are there other solutions or packages besides this script?
  • Post# 13
  • Quote
  • Aug 30, 2011 2:18am
  • deanz
    Joined Nov 2005 | 111 Posts | Status: Member
the only way I know to auto scroll is to use ninjatrader, but I do not know of any free data providers for forex.
perception is reality
  • Post# 14
  • Quote
  • Aug 30, 2011 2:32am
  • nubcake
    Joined Oct 2009 | 2,372 Posts | Status: schadenfreude tastes like joy
i'm not about to bother actually doing the code in any of the scripts... but a very simple solution is to comment how many bars away the vert line is compared to WindowFirstVisibleBar() and / or work out how many 'pages' back the vert line is via WindowFirstVisibleBar() combined with WindowBarsPerChart(). to be fair, if you get this far then you might as well actually work it out from the middle bar on your screen instead of the leftmost bar... piece of cake.

it's not autoscrolling to the position for you, but at least you aren't taking stabs in the dark as to how far back or forward you need to go to find what you are looking for if it's displayed on the screen for you automatically.
  • Post# 15
  • Quote
  • Sep 19, 2011 4:15pm
  • FinGeR
    Joined Nov 2005 | 27 Posts | Status: Member
I have it programmed for MetaTrader 5.

Inserted Video


look my Blog
http://www.metatraders.de/2011/09/18...-version-1-20/
  • Post# 16
  • Quote
  • Oct 5, 2011 4:27pm
  • FinGeR
    Joined Nov 2005 | 27 Posts | Status: Member
here CrossHairs OnClick Version (not additional contain calls to DLL.)



Inserted Video
Attached File
File Type: zip onClick CrossHairs.zip   55 KB | 178 downloads
  • Post# 17
  • Quote
  • Oct 12, 2011 6:18pm
  • balouf
    Joined Jul 2007 | 175 Posts | Status: Member
Can you convert it into MT4?
  • Post# 18
  • Quote
  • Oct 13, 2011 9:47am
  • FinGeR
    Joined Nov 2005 | 27 Posts | Status: Member
MQL4 is not possible. Consumes too much system resources.
  • Post# 19
  • Quote
  • Feb 12, 2012 2:07am
  • coymahrens
    Joined Aug 2008 | 13 Posts | Status: Member
THANKS!!!





Quoting FinGeR
I have it programmed for MetaTrader 5.

http://www.youtube.com/watch?v=N7LNpArJ5cc

look my Blog
http://www.metatraders.de/2011/09/18...-version-1-20/
  • Post# 20
  • Quote
  • Feb 13, 2012 7:40pm
  • coymahrens
    Joined Aug 2008 | 13 Posts | Status: Member
does anyone know how to contact FinGer or have the cursor file?
thanks, mark
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Platform Tech
  • /
  • Program to Allow MT4 to show crosshair over different timeframes
  • Reply to Thread
    • Page 1 2
0 traders viewing now
  • More

©2013 Forex Factory, Inc. / Terms of Use / Privacy Policy

Forex Factory® is a registered trademark.

Connect

  • Facebook
  • Twitter
  • RSS

Company

  • About FF
  • FF Blog
  • Careers at FF
  • Advertising
  • Contact FF

Products

  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer

Website

  • Homepage
  • Search
  • User Guide
  • Member List
  • Online Now
  • Report a Bug