I want to ask how I can force stream reader (I use it for reading from web) in onbarupdate eg only with close of bar when running a script with cobcfalse. Because NT7 was frozen all the time I put it to onstartup, but I need to read it during a trade in onbarupdate for moving stops. I have now:
string uri = @"https://www.dropbox.com/s/" + filePath;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
using (StreamReader sr = new StreamReader(resp.GetResponseStream()))
{
string line;
while ((line=sr.ReadLine())!=null)
{
string[] parts = line.Split(',');
and so on.............
Whats wrong with this please or what do I have to add so that I can use it in onbarupdate without freezing?
Thank you!
Tony
Comment