Forum on trading, automated trading systems and testing trading strategies
Hello,
Please EDIT your post and use the SRC button when you post code.
1° No idea, you need to provide more code, and code that compiles, not pseudo code.
2° Yes an array. PriceDataTable is an array I suppose, PriceDataTable[9] is not an array.
are you sure you defined
double PriceDataTable[];ArrayMaximum(PriceDataTable, 0, WHOLE_ARRAY);
are you sure you defined
double PriceDataTable[];Yes i did define that in the setup of the EA. Thank you for your comment though!
For the first part, from the few lines of code you disclosed, nobody can answer you what is the trouble with your code
If you don't want to post the entire code, almost sure that you will be left to find the error alone
1° No idea, you need to provide more code, and code that compiles, not pseudo code.
2° Yes an array. PriceDataTable is an array I suppose, PriceDataTable[9] is not an array.
For the first part, from the few lines of code you disclosed, nobody can answer you what is the trouble with your code
If you don't want to post the entire code, almost sure that you will be left to find the error alone
Ah ok i didnt realise. Sure I will do that from now on. Ok i will provide more of the code when i get home and for number 2:
Why ? There is no why...it's how it's designed by the language developers.
Please show your code if you need coding help.
Oh no i dont mind posting the code, i just didnt want to post anything that wasnt needed and make the post longer than it needed to be. My apologies
Why ? There is no why...it's how it's designed by the language developers.
Please show your code if you need coding help.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was wondering if you could help me with two issues I am currently having? :)
Here is number 1:
if(PositionSelect(_Symbol) == false) // We have no open position
{
if(MathAbs(PriceDataTable[1] - mAData[1]) < 10 * P)
{
if (my conditions to open a trade)
{
(Open a Buy Trade)
For some reason though, I am getting two errors that say 'Illegal
operation in use' and 'parameter conversion not allowed'.
Do you know why this is? It is a rule I am putting in place that
essentially says if the price action gets within 10 pips of the MA
line and meets my other conditions,
it will enter a trade.
Number 2:
I have then created a function at the bottom of my program (right at
the bottom out of the OnTick area). This is what I did:
int SearchArray()
{
if (PositionSelect(_Symbol) == true) // If there is an open position
{
ArrayMaximum(PriceDataTable[9], 0, WHOLE_ARRAY);
}
return 0;
}
... but i get the error: 'PriceDataTable' - array required??
Really not sure how to get past these two issues?
Thanking you in advance