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
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.