Help with pointers, and returning arrays

 
I wrote this function which returns two arrays, but i had to define it as a pointer. It's throwing me errors please can anyone help me here 
Files:
 

Use the button to insert your code. Don't use picture of it please.

MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
Alain Verleyen #:

Use the button to insert your code. Don't use picture of it please.

bool* HighLowVerify(double &uHighs[], double &uLows[], double &Zigzag[], double &CCIReader[])
{
  bool positiveHighs[], negativeLows[];
  // read price and time of each candlestick in the uzigzag array.
  // compare that value to the  CCI reading
  for (int i = 0; i < ArraySize(Zigzag); i++)
  {
    if (CCIReader[i] >= 1)
    {
      ArrayCopy(positiveHighs, Zigzag, 0, 0);
      Print("The value of this is positive", positiveHighs[i]);
    }
    else if (CCIReader[i] <= -1)
    {
      ArrayCopy(negativeLows, Zigzag, 0, 0);
      Print("The value of this is negative", negativeLows[i]);
    }
  }
  return (positiveHighs,negativeLows);
}
Sorry about that here's the code 
 
Quantum Dev #: Sorry about that here's the code 
  1. Do not post code that will not compile. Your function definition says you are returing a pointer to a bool. MTx does not have pointers. It only has handles to a class.
  2. Do not post code that will not compile. You are attempting to return two values. You can only return one.
 
William Roeder #:
  1. Do not post code that will not compile. Your function definition says you are returing a pointer to a bool. MTx does not have pointers. It only has handles to a class.
  2. Do not post code that will not compile. You are attempting to return two values. You can only return one.
Thank you. I'll do the logistic another way