Questions from Beginners MQL5 MT5 MetaTrader 5 - page 266
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
OK, even in the simplest case it doesn't work:
I don't understand where my mistake is. Copying the same indicator buffer in EA and script works, but not in indicator. The indicator handle is initialized without error.
Find the difference. )
Yep, got it, in the last version of my code the indicator handler was getting into the wrong scope of the variable. I missed it, thank you. But there is one problem - in the tester, on historical bars before the beginning of the testing period, the indicator works normally, but starting from the beginning of the testing period the newly arrived ticks are not considered. I.e. buffer of a child indicator is not updated.
Good people, please help to correct the code, so that from job line in "Input parameters" of advisor
extern string Lot = "0.2 0.2 0.3 0.4 0.5"; // (through a space)
the last value (in this case 0.5) would repeat infinitely i.e. not to type
"0.2 0.2 0.2 0.3 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5";
//----------------------------
StringToArrayLot(Lot,xiLot);
//---------------------------------------------------
int StringToArrayLot(string st,double &ad[])
{
int i=0,np; string stp;ArrayResize(ad,0);
while(StringLen(st)>0)
{
np=StringFind(st," ");
if(np<0)
{
stp=st;
st="";
} else{
stp=StringSubstr(st,0,np);
st=StringSubstr(st,np+1);
}
i++;
ArrayResize(ad,i);
ad[i-1]=StrToDouble(stp);
}
return(ArraySize(ad));
}
Why can't I see my EA on the website or in the terminal?
To see it on the website, you have to upload it. To compile it in the terminal.
I can't see it on my profile.
will post it on the website I can't see it on my profile
Give me a link to an Albanian dictionary, please.
http://www.txtblog.ru/blog/1165306807 here you go
http://www.txtblog.ru/blog/1165306807 here you go
Herr Hattar's on fire.
Come on!
Bazinga!