Do you think we know what are BarA[],BarB[],Diff[] and BAR_COUNT?
They were just declared as standard arrays like:
double DIFF[];
double BarA[];
double BarB[];
Bar_Count is just an extern variable.
Anyone got a clue?
After you declare you arrays, you have to resize your arrays with ArrayResize() function, like this:
ArrayResize(BarA,BAR_COUNT);
and ususally for() cycle use this way:
for(int z = 0; z < BAR_COUNT; z++)
{
DIFF[z] = BarA[z] - BarB[z];
}
hi, calpurnia
u haven't provide enough info for us to hwlp u
u are encount compile problem or others problem
if the program don't do what u want, u can use Print() to print out the variable~ ~
so that u can find out where/which variable not you want
Calpurnia:
I've created a for loop to run through a predetermined number of bars, and provide me with the difference between bar A & bar B storing it in new array. Here's my code:
for(int z = 0; z < BAR_COUNT; z++)
DIFF[z] = {BarA[z] - BarB[z]};
THanks for any help
strange parenthesis position, highlighted in red
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
I've created a for loop to run through a predetermined number of bars, and provide me with the difference between bar A & bar B storing it in new array. Here's my code:
for(int z = 0; z < BAR_COUNT; z++)
DIFF[z] = {BarA[z] - BarB[z]};
THanks for any help