Wininet and assigment ? - page 2

 

Does it work on the first tick?

What does it print here?

BOBuy = StrToDouble(sBOBuy);
BOSell = StrToDouble(sBOSell);

Print(BOBuy +"//"+ BOSell);

 
phy:

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()

 
Working fine now - thanks a lot
 

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.

Reason: