
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
Hello!
I have a problem with adding an "Inputbox" to my ExpertAdvisor to set an input parameter (Indicator price) by clicking the specific botton ("Button_setINDprice") in the chart.
What I can find in the forum and I´m trying is the following:
..........................................................................................
#include <stdlib.mqh>
#include <WinUser32.mqh>
#property strict
#import "inputbox.dll"
string InputBox(string,string,string); // or: string InputBox(string prompt, string title, string default_value);
#import
............
// local variables
int INDprice=0;
string TXT=IntegerToString(INDprice);
...........
void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam){
if(id==CHARTEVENT_OBJECT_CLICK){
if(sparam=="Button_setINDprice"){
if(ObjectGetInteger(0,sparam,OBJPROP_STATE)==true) {string INPUT = InputBox("Please set INDIC-Price: ","text...",TXT); INDprice=StrToInteger(INPUT);
...}
DLL-Import in MT-Options is allowed. But by clicking the botton always I get the following failure massage:
"Cannot call 'inputbox.dll::InputBox', 'inputbox.dll' is not loaded". "unresolved import function call"
Do I need to attach
"#include <libtrade.mqh>" or/and
"#include <libvisual.mqh>" ???
"libtrade.mqh" doesn´t exist in the direction "terminal\...\MQL4\include" and cannot be find in internet.
Please, anybody can help me?
Thanks!