MQL4 Add indicator to chart from EA - page 3

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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
sleep has worked, thanks
I'm using Alain's code and it works in the sense that the classic indicator form appears asking me to fill the parameter and then click Ok to activate the indicator and it's similar to manually attach the indicator. Is it possible to completely automate the entire operation even the settings of the required parameters? Thanks
I'm using Alain's code and it works in the sense that the classic indicator form appears asking me to fill the parameter and then click Ok to activate the indicator and it's similar to manually attach the indicator. Is it possible to completely automate the entire operation even the settings of the required parameters? Thanks
I don't have this problem (with the code I posted).
Check that hWnd is different from 0.
You can also try to increase the sleep value to 50 or 100.
Hello,
This comment to many help, I need other question,
Can I bypass the input popup and use default of indicator? How to coding?
Can I delete indicator from the chart?
Thanks this is what i am looking for, i can add my custom indicator, just one more question, how to unload it ?
Congratulaions, it works fine.
I don't have this problem (with the code I posted).
Check that hWnd is different from 0.
You can also try to increase the sleep value to 50 or 100.
I'm using your code, but I have a problem with it's name.
2018.01.11 12:06:15.864 cannot open file 'C:\............\MQL4\indicators\MACDèõšp.ex4' [123]
2018.01.11 12:04:00.518 cannot open file 'C:\.............\MQL4\indicators\MACD .ex4' [123]
First line is raised when
uchar name2[4];
name2[0]='M'; name2[1]='A'; name2[2]='C'; name2[3]='D';
// StringToCharArray(IndicatorName,name2,0,StringLen(IndicatorName));
Second line is raised when
uchar name2[];
StringToCharArray(IndicatorName,name2,0,StringLen(IndicatorName));
I changed First code it's working now!
uchar name2[5];
name2[0]='M'; name2[1]='A'; name2[2]='C'; name2[3]='D'; name2[4]=0;
// StringToCharArray(IndicatorName,name2,0,StringLen(IndicatorName));
Hello everyone,
I would like to thanks Georgiy Liashchenko, and I would like to share my upgraded version of his code that add the indicator directly into the chart with AutomaticallyAcceptDefaults (when it is on "true").
I hope it will help some people that need to insert indicators from the expert.
Note : I works for custom indicators, else change the windows name
Note2 : Don't use indicators with more than 15 characters (before the ".ex4")
Hello everyone,
I would like to thanks Georgiy Liashchenko, and I would like to share my upgraded version of his code that add the indicator directly into the chart with AutomaticallyAcceptDefaults (when it is on "true").
I hope it will help some people that need to insert indicators from the expert.
Note : I works for custom indicators, else change the windows name
Note2 : Don't use indicators with more than 15 characters (before the ".ex4")
Very nice.
I discovered that using:
Instead of using:
Will let you use standard indicators also, by using the standard indicator's name.
I get a
error message when I try to compile it?!Kray:
Hello everyone,
I would like to thanks Georgiy Liashchenko, and I would like to share my upgraded version of his code that add the indicator directly into the chart with AutomaticallyAcceptDefaults (when it is on "true").
......
I'm running MT4 v4.00 Build 1090 (19 May 2017).
The function PostMessageW causes my MT4 terminal to crash when I use it from within a script to place an indicator.
I've used SendMessageW as an alternative to place the indicator, but unfortunately, this means that there is no way to close the config dialog box by simulating a keyboard event and pressing the Enter key. I think this might be because the SendMessageW function does not return until the window procedure has processed the message, which means that the keyboard event can't be processed until the dialog box is gone. This in turn means that FindWindowW won't work while the dialog box is displayed, since SendMessageW won't return until the dialog box is gone.
This whole thing has been one great big exercise in frustration for me. Does PostMessageW still work on the latest build of MT4? Does anyone know how to close the indicator's config dialog box programmatically? I've consulted two other threads, tried their recommendations and been unsuccessful:
https://www.mql5.com/en/forum/155334
https://www.mql5.com/en/forum/115967
Can someone enlighten me? Is there any way to get PostMessageW to work, or to close the config dialog box some other way?