Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Does it work on the first tick?
What does it print here?
BOBuy = StrToDouble(sBOBuy);
BOSell = StrToDouble(sBOSell);
Print(BOBuy +"//"+ BOSell);
Does it work on the first tick?
What does it print here?
BOBuy = StrToDouble(sBOBuy);
BOSell = StrToDouble(sBOSell);
Print(BOBuy +"//"+ BOSell);
When it comes to draw the line, the level is correct but when i ask to print the levels, the ea returns the following : 0.000000 // 0.000000
That is because:
string sBOBuy=FileReadString(handle,6);
string sBOSell=FileReadString(handle,6);
only gets executed (assigned) when the file is read
BUT
sBOBuy and sBOSell are declared and intitalized to "" on each tick
and later you convert that "" to a double, which is 0.0000
----------
Oh ok - and how do i do to make the assigment last even when the file is not read ?
Thanks for your help - you are the best
declare string sBOBuy and sBOSell before start()
Great, do you know why?
I just declare string sBOBuy and sBOSell before start() and you were right, the variables are no longer reinitialized at each tick.
Now i'm going to work on the process of acquiring the file from internet.