Problem with export D1 data in real time

Back to topics list To post a new topic, please log in or register
avatar
29
castann86 2015.06.09 20:53
 


 

 

avatar
13010
WHRoeder 2015.06.09 22:13 #
 
castann86: the code not work for D1.
  1. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. int handle_read1 = FileOpen("GBPUSD"+"_D1"+"_result.csv",FILE_CSV|FILE_READ,';');
    if(handle_read1 >= 0)
    :
    int handle_read2 = FileOpen("AUDCAD"+"_D1"+"_result.csv",FILE_CSV|FILE_READ,';');
    if(handle_read2 >= 0)
    Above you know that zero is valid handle. So why don't you know it later?
      handle = FileOpen(filename,FILE_CSV|FILE_WRITE,';');
      if(handle < 1)
    :
      handle1 = FileOpen(filename1,FILE_CSV|FILE_WRITE,';');
      if(handle1 < 1)
    :
      handle2 = FileOpen(filename2,FILE_CSV|FILE_WRITE,';');
      if(handle2 < 1)
avatar
29
castann86 2015.06.09 22:36 #
 
WHRoeder:
  1. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. Above you know that zero is valid handle. So why don't you know it later?
i think i understand, but for to learn of my mistakes:

1- Why, the code has the requeriment results for EURUSD and no for GPBUSD and AUDCAD?

2- Why this code has the requeriment results for other timeframes for this currencies?

I dont know this two situations.

Thank you for your reply WHRoeder
avatar
29
castann86 2015.06.10 21:59 #
 
What a mistake I'm making?
thank you very much
avatar
29
castann86 2015.06.11 08:02 #
 

Any help?

 i dont understand why the code not have the requirement results

Thank you very much 

avatar
13010
WHRoeder 2015.06.11 12:51 #
 
castann86:  i dont understand why the code not have the requirement results
Asked and answered.
  1. You expect mind readers. "not have required results" is meaningless. You fail to state what is does, you fail to state what is should do.
  2. You fail to think. I reminded you that "zero is a valid handle" and you changed your code to:
      handle = FileOpen(filename,FILE_CSV|FILE_WRITE,';');
      if(handle >= 0)
      {
        Print(" #", GetLastError());
        return(0);
    You try open the file. If it is successful, you return, loosing the handle, keeping the file open, and nothing works after that.
avatar
126
Demos 2015.06.11 13:03 #
 

hello,

I copied all your code and compiled in my pc but it did not worked, even for other timeframes. So, are you sure it does work at all?  

avatar
13010
WHRoeder 2015.06.11 14:54 #
 
Demos: I copied all your code
I didn't post any code. You fail to think.

avatar
29
castann86 2015.06.11 15:08 #
 
Demos:

hello,

I copied all your code and compiled in my pc but it did not worked, even for other timeframes. So, are you sure it does work at all?  

Yes Demos, 

for other timeframes the code worked well.

I dont understand

 

Thank you very much 

avatar
29
castann86 2015.06.11 15:14 #
 
WHRoeder:
Asked and answered.
  1. You expect mind readers. "not have required results" is meaningless. You fail to state what is does, you fail to state what is should do.
  2. You fail to think. I reminded you that "zero is a valid handle" and you changed your code to:
    You try open the file. If it is successful, you return, loosing the handle, keeping the file open, and nothing works after that.

Hi WHRoeder,

i only am learning mql4, and i built indicators that can be usefull in future for me.

i dont understand some things .

I dont understand Why the indicator work for other timeframes and no work for D1.

With your post, you want say that i must no use return(0) in this situation because if i use return(0), i loose the handle.

It is correct? 

Back to topics list  

To add comments, please log in or register