Davidii111:
Replace i+86400 with i+=86400
Hi,
what is wrong with following code?
I get following warnings:
1) possible loss of data due to type conversion
2) expression has no effect
Br David
Wahoo:
Replace i+86400 with i+=86400
Replace i+86400 with i+=86400
Hi, Thanks!
When i tried to run
int i; i=StartDate+86400; Print(i);
I succeeded to add, why didnt it succeed in the for expression?
Br David
im still struggling with this code,
i have a new problem:
for(int i=StartDate; i<=EndDate; i+=86400) { double array_high[]; ArraySetAsSeries(array_high,true); int copied_high; string pair=Symbol(); copied_high=CopyHigh(pair,PERIOD_H1,i,12,array_high); Print("copied_high error "+GetLastError()); //double MaxValue=high_array[ArrayMaximum(high_array, WHOLE_ARRAY,0)]; FileSeek(Handle,0,SEEK_END); FileWrite(Handle,TimeToString(i,TIME_DATE),TimeToString(i,TIME_MINUTES),copied_high); FileWrite(Handle,DoubleToString(array_high[5],5)); // iATR(NULL,0,12,0); Print(i+" "+TimeToString(i,TIME_DATE)+" "+TimeToString(i,TIME_MINUTES)); Print(ArrayRange(array_high,0)); }
If i replace the "i" in the copied_high=CopyHigh(pair,PERIOD_H1,i,12,array_high); with "0" it works, but if i have the i there it refuses to define the arrays, and i get error code 4054.
Can anyone put me in the correct direction here?
Br David

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
Hi,
what is wrong with following code?
I get following warnings:
1) possible loss of data due to type conversion
2) expression has no effect
Br David