No, you're missing the idea. I'm not changing time frames. Each of the time toggle does is create some indiors disappear when the toggle is pressed.
No, you're missing the idea. I'm not changing time frames. Each of the time toggle does is create some indiors disappear when the toggle is pressed.
There probably is a workaround with the windows api.
I did some extensive gui material with mt4 earlier (like guide trader during backtest...).
Just some food for thought:
A script generates and modifies a GlobalVariable. 1 if caps is pressed 0 (cautious GlobalVariableGet returns 0 if an error occurs...) if it's released. You can do that by binding the script to caps (not positive if you really can bind a script to simply covers lock... but another key combination will be sufficient).
And now add the following code to your Indior:
Inserted Code if(Period() == 1 GlobalVariableGet(Caps Symbol()) )
GlobalVariableGet returns a double value so that you might need to add another check to make it failproved
-----------------------
Choice but not so wonderful way...
Create a script which will put a hidden object on the chart. Scripts can be jumped to shortcuts. The EA then checks whether the thing exist if it will it delete it performs a task based on that. Based on that it's possible to set the visibility of the indior. It is messy but it works.
Now that's a great idea!! I will have a think about how to implement it... im not the worlds best coder but that seems ideal! I'm not dead set on the caps key, that will likely cause unnecessary problem to establish as a hot-key for your own script. That seems like a wonderful idea though! Thank you!
M
The script May look something like That:
Inserted Code int Begin () string name = Hide Symbol(); if (GlobalVariableCheck(name)) switch (GlobalVariableGet(name)) case 1: GlobalVariableSet(name,2); break; case Two: GlobalVariableSet(name,1); break; default: ;// Publish Error Handling; else GlobalVariableSet(name,1); return(0);
The short version May also work:
Inserted Code int start() string name = Hide Symbol(); if(!GlobalVariableSetOnCondition(name,2,1)) GlobalVariableSet(name,1); return(0);
I have not worked with mql4 a long time but in Java you are supposed not to directly compare a double and an int value because it happens that a two could be represented as something similar to 1,9999999999999999 which cause the change statement to fail. I don't think that occurred in mql4 though. If you experience any trouble attempt to normalize the dual or convert it to an integer.
Ahh I discovered something. If you are bored you can start reading this article http://forum.mql4.com/4647
Do you mean you stay in the exact same chart window and then just switch template and period inside it? Simplest solution is, open the same currency pair in different windows, optimize themthen you can switch between the timeframes by altering the windows. So then you have your messy M1 chart down there, you can click and view it whenever you like to, then simply switch back to your normal chart right alongside it.Originally Posted by ;
If you want the script to consciously respond to any key you press, that is not possible inside the scripting terminology mq4 itself. You would have to load a dll for it.
And with the latest update to build 500, I think Metaquotes even made it more challenging to call outside dll files or burden themwhich I think is a very bad move of those. Many programmers who developed advanced tools for metaquotes utilize dll to embed more innovative features. And now their resources dont work with the newest version... But I do not know if they disallowed to call dll files inside mq4 completely.