MQL4 - automated forex trading   /  

Forum

problem finding windows

Back to topics list To post a new topic, please log in or register

avatar
308
TheEconomist 2007.11.01 01:42 
Does anyone know how to find the index of a window based on the symbol ? WindowFind is supposed to work with indicator names, and a WindowFind("EURUSD") will return -1...
article

Interview with Alexander Ovchinnikov, the current Championship Leader

I agree that stops must be placed. I just could place a StopLoss for my expert at 400 to 500 points. I think there is not a great difference, in terms of historical data of 2006. It is true, the expert does not close positions by itself. I did not even notice that during testing as I only watched profit.


avatar
2462
phy 2007.11.01 04:21 

int WindowHandle( string symbol, int timeframe)
Returns the system window handler containing the given chart. If the chart of symbol and timeframe has not been opened by the moment of function calling, 0 will be returned.


avatar
308
TheEconomist 2007.11.01 16:04 
Thanks, but it wasn't what I was looking for. What I get from this function is the handle allocated by Windows. What I wanted was the index that I can pass to ObjectCreate to correctly place my object in the window that I want. Any idea?

avatar
2462
phy 2007.11.01 17:37 

Your code can only place an object in the main or subwindow of the chart it is "attached" to. Index is 0, 1, 2 etc for
chart and indicator subwinddows. WindowFind uses indicator short name to locate subwindows only.

int WindowFind( string name)
If indicator with name was found, the function returns the window index containing this specified indicator, otherwise it returns -1

Parameters:
name - Indicator short name.

void IndicatorShortName( string name)
Sets the "short" name of a custom indicator to be shown in the DataWindow and in the chart subwindow.


avatar
308
TheEconomist 2007.11.01 18:08 
Thanks for the explanation. This is what I was trying to do , place objects in other windows . I understand now.

avatar
1
globalbloke 2007.11.02 12:24 
No I still don't get it. I am completely new at this and I think my question relates to that of The Economist. I inadvertently closed a window GBP/USD and now cannot see how to restore it. It appears to be more complex than just finding it in the MetaTrader (practice account) itself. Also, I cannot figure out how to get up windows of other pairs besides the default ones. cannot find it in 'help' either.

Anyone willing to give me some pointers please?

avatar
2462
phy 2007.11.02 20:30 

Open MarketWatch window, right click, and show all. Menu --- View --- MarketWatch

You can only open pairs that are provided by the feed (Dealer) to which you are connected.

To open a chart:

Menu --- File -- New Chart

or

Right Click a pair in the MArket Watch and choose "Chart Window"

As for deleted charts, Menu -- File --- Open Deleted


avatar
308
TheEconomist 2007.11.03 13:44 
Yeah, guess you actually meant the File - Open Deleted.   As for other pairs, righht click Market Watch, then Show All . Also it's interesting to right click Market Watch and point to Symbols... Lots of undisplayed info are there (like expiry dates for currency futures , as I saw on a broker)
Back to topics list  

To add comments, please log in or register