'series' - arrays are passed by reference only

 

Hello, please, I need complete this code. Any suggestion? thanks


//+------------------------------------------------------------------+

//|                                fFractalSegmentSeriesAnalysis.mqh |
//|                                Copyright 2019, Korotchenko Roman |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, Korotchenko Roman"
#property link      "https://www.mql5.com"
//+------------------------------------------------------------------+
//| defines                                                          |
//+------------------------------------------------------------------+


void fFractalSegmentSeriesAnalysis(double series[], int segmLength, int segmShift


compiled:

'series' - arrays are passed by reference only fFractalSegmentSeriesAnalysis (1).mqh 13 43, 

'segmShift' - unexpected end of program fFractalSegmentSeriesAnalysis (1).mqh 13 73



Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5
Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5
  • 2022.11.03
  • www.mql5.com
MQL5: язык торговых стратегий для MetaTrader 5, позволяет писать собственные торговые роботы, технические индикаторы, скрипты и библиотеки функций
 
marcus vasconcellos: Hello, please, I need complete this code. Any suggestion? thanks

Your code is incomplete and will not compile as it stands.

Also, please use the "</>" icon or Alt-S when adding code to your post.

 
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. void fFractalSegmentSeriesAnalysis(double series[], int segmLength, int segmShift …

    You are trying to pass an array by value. Pass it by reference.

 
marcus vasconcellos:


'series' - arrays are passed by reference only fFractalSegmentSeriesAnalysis (1).mqh 13 43, 

'segmShift' - unexpected end of program fFractalSegmentSeriesAnalysis (1).mqh 13 73

void fFractalSegmentSeriesAnalysis(double &series[], int segmLength, int segmShift
 
Fernando Carreiro #:

Your code is incomplete and will not compile as it stands.

Also, please use the "</>" icon or Alt-S when adding code to your post.

Thanks for reply. Yes, I will make right the next time.

 
Vitaly Muzichenko #:

Thanks, I used "&" and problem array was solved but code did not run. 

 
William Roeder #:
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. You are trying to pass an array by value. Pass it by reference.

Thanks, I will use better practices in the next time. I will try use-it by reference. Thanks again.