Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I need price & time (of cursor) when hotkey is pressed.
Quote:
Originally Posted by codersguru
Hi Flolks,
I really don't know what the issue!!
My code can handle any hotkey and of course you can set any type of code when the hot key is pressed.
Download the attached indicator and click (ctrl+0) and see.
Regards,
CG
Hi CG,
You love a challenge, and I appreciate all the great posts you've shared.
The difficulty I'm having is not simply to detect whether a hotkey (or mouse click) was pressed, but where was the cursor at the moment it was pressed, in terms of price and time ? I see no clue in your code (nor anywhere else) that solves this problem.
I want to write a script that places objects in the current window at whatever price & time the cursor is at when the script executes. I don't want to use drag-and-drop of the script onto the chart (because if I did, the solution would be easy, which is "WindowPriceOnDropped" and WindowTimeOnDropped".
The process of locating the script on the Navigator list and drag-and-dropping it is tedious, compared to just pushing a function key on my keyboard. (The Logitech G11 keyboard has 18 programmable G keys, and 3 sets each, so I can have 54 functions). The most obvious first application is rapid Elliott Wave labelling by just pointing with the cursor and pressing a function key. I have plenty of other applications in mind if this "price & time when executed" problem can be solved, so this would really be very useful.
Getting the cursor location on the screen is not the problem. The problem is how to translate this location to time and price is the problem.
Quote:
Originally Posted by pips4life
Hi CG,
You love a challenge, and I appreciate all the great posts you've shared.
The difficulty I'm having is not simply to detect whether a hotkey (or mouse click) was pressed, but where was the cursor at the moment it was pressed, in terms of price and time ? I see no clue in your code (nor anywhere else) that solves this problem.
I want to write a script that places objects in the current window at whatever price & time the cursor is at when the script executes. I don't want to use drag-and-drop of the script onto the chart (because if I did, the solution would be easy, which is "WindowPriceOnDropped" and WindowTimeOnDropped".
The process of locating the script on the Navigator list and drag-and-dropping it is tedious, compared to just pushing a function key on my keyboard. (The Logitech G11 keyboard has 18 programmable G keys, and 3 sets each, so I can have 54 functions). The most obvious first application is rapid Elliott Wave labelling by just pointing with the cursor and pressing a function key. I have plenty of other applications in mind if this "price & time when executed" problem can be solved, so this would really be very useful.
Getting the cursor location on the screen is not the problem. The problem is how to translate this location to time and price is the problem.
I don't know if it is worth the work, but a solution might be to find the sub-window "Data Window" thru some dll and read it (I think its a ListView32 control)
Another idea is to have a small object which follows the pointer and to read its properties
// Example to read the statusbar text of the explorer.exe
procedure TForm1.Timer1Timer(Sender: TObject);
var
hWindow, hStatusBarHandle: HWND;
begin
hWindow := FindWindow('ExploreWClass', nil);
if FensterHandle = 0 then Exit;
hStatusBarHandle := FindWindowEx(hWindow, 0, 'msctls_statusbar32', nil);
label1.Caption := GetStatusBarText(hStatusBarHandle, 2);
end;
I'm thinking that's going to take someone who knows the ins and outs of handling windows mouse events within a custom dll that would then expose them to metatrader via exported functions. It would also need to pass down the "window" the event occured on. There's nothing already available in MT4 that I'm aware of that would make that easy. I agree it would be handy though.
Scalping need to fast / immediate after fullfilling all the conditions.
Does anybody can programme the HotKey's i.e. B/buy, S/sell and E/exit that will automatically execute the trade after use it upon earlier setting up the parameters ?
Problem starts when one has more then 1 opened trade, so the propo is when the trade is sublighted on the Commerce MT4 bookmark the 'E" key will close this trade what is highlighted.
or maybe someone has already done it or heard it ?
thx
Greg
Fellow Forum Members,
I am using Metatrader 4 and what is driving me crazy is that it has no built in feature that enables one to assign hot keys for toggling between charts. I have some 23 currency pairs and scrolling through all of 23 tabs at the bottom is something I dislike doing.
Is there an addon out there that will let me assign a hot keys such as "Control+ALT+1" to toggle over to the USD/GBP chart or "Control+ALT+2" to toggle over to the USD/CAD chart?
I am hoping someone out there has a solution for this because I am the type of computer user that likes to control software apps mostly by using my keyboard keys. Any info will be greatly appreciated. Thanks in advance.
When you want to open a quick trade is there a better way to do that? I know about the F8 key, but you still have to do other steps to get into a trade. Is there a faster way? or does meta trader not have it?