I'm not exactly sure, but I think it's probably impossible.
How about incorporating it into the indicator? For example,
#define KEY_UP 38 #define KEY_DOWN 40 : : //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if (id == CHARTEVENT_KEYDOWN) { if (lparam == KEY_UP) ChartSetSymbolPeriod(0, _Symbol, PERIOD_D1); else if (lparam == KEY_DOWN) ChartSetSymbolPeriod(0, _Symbol, PERIOD_H1); } } //+------------------------------------------------------------------+
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Traders,
I need your expert help once again, I am trying to put together a simple code to change the timeframes, below is what I did, is working fine but I am getting the message "Do you really want to stop script?" every time I run it, it is a bit annoying. Any advise on how I can get rid of this? Meaning stop the script to show that message every time I run it. I am using this script to change between timeframes with hot keys quickly than using "Enter+H1+Enter" just to used two key for example.
Thanks in advance
Regards