'CopyRates' Error
Did you take the time to verify the documentation regarding the CopyRates function?
Your use (6 parameters) ...
CopyRates(_Symbol, onehourtf, 0, 1, oneHourCandleAgo, oneHourAgo)Documentation (5 parameters) ...
int CopyRates( string symbol_name, // symbol name ENUM_TIMEFRAMES timeframe, // period int start_pos, // start position int count, // data count to copy MqlRates rates_array[] // target array to copy );
Do you see the issue?
Did you take the time to verify the documentation regarding the CopyRates function?
Your use (6 parameters) ...
Documentation (5 parameters) ...
Do you see the issue?
The documentation clearly states that you need to use an array, even if you just copy one element ...
int CopyRates( string symbol_name, // symbol name ENUM_TIMEFRAMES timeframe, // period int start_pos, // start position int count, // data count to copy MqlRates rates_array[] // target array to copy );
Alright lemme try working on it and see where it takes me
The error is because you are misunderstanding how CopyRates works.
You can also use iClose and iOpen, but I think that CopyRates may be more efficient.
Greetings to you all
can any one please help me i have been bugged by this error for quite some time now: 'CopyRates' - no one of the overloads can be applied to the function call
here is the code:
even if i use ArrayReSize() function i'm still getting the same error right at the copyrates line