2 questions

 
Hi,
I am wondering if I can do these in MT4:

1, "go to" some time in history. For example, go to 2004/01/01. I only know to switch off "auto scroll" and drag the chart with mouse many many times.....

2, I often draw in the chart 3 kinds of arrows: "Arrow Up", "Arrow Down" and "Stop Sign". Is it possible to automatically read the price of an arrow after I draw it , and send this price value to a TXT file or a database, instantly (in this case, there's no need to consider which security on what period is involved) or after I shut down MT4.

Thanks.
wyf.
 
1. Double click lower left corner under chart time axis. Put date. Press "enter"
2. Some script with endless lopp can do it
 
Thanks a lot, Slawa.
1, I filled in something like "18-02-2004", it works great.
2, could you please give me more hint?
 
Reading the value/type of an arrow which is the last one or new-drawn, is the most difficult for me.
 
Reading the value/type of an arrow which is the last one or new-drawn, is the most difficult for me.

Do you need to reed it instantly or can you wait for next tick.
 
Not that fast...I always draw the next arrow more than 10 seconds later. And that's after many bars.(I use F12.) In the other hand, this is in "history", so the arrow I just drew may not be the last one ---- but if this causes complexity, I can clear all the arrows before I start the history simulation.
 
I tried to learn MQL from Metaeditor, but something showed as:
---------------------------------------------------------------------
int BarsPerWindow( )

Function returns the amount of bars visible on the chart.

Sample:

// work with visible bars.
int bars_count=BarsPerWindow();
int bar=FirstVisibleBar();

......
---------------------------------------------------------------------
I don't know if "FirstVisibleBar()" is a function or something else . ?
Reason: