Passing a variable from an Indicator to EA

 

Hi,

I am trying to get a value from an Indicator (that is not an array) and pass it to my EA.  I believe I need to pass the variable by reference, but am struggling on how this works (I am using MT5.)

Specifically, I am using Harmonic Pattern Finder V2 and would like to capture the value of D at the point in time it gets a value.  I have printed the value to the log, so I know it is what I want to capture and use.  I believe I need to make an include file that would be the go between.  Then would I have the indicator set a value in the include file and thus my would EA read this value for further use?  I am unsure how to approach this and would need some clarification on how passing values by reference really works.

I have been to Using the Object Pointers in MQL5 and there appears to be a bug in the code or an update breaks it.  The pstatus.GetMessage(); will return "Invalid Point Access" the way it is written.

Any kind of help or direction would be greatly appreciated!!


Thanks!

-Dan

 
Danja88: I am trying to get a value from an Indicator (that is not an array) and pass it to my EA.  I believe I need to pass the variable by reference,
  1. Out of a buffer via iCustom
  2. Out of object
  3. via Global variables.
  4. Interprocess communication (disk, pipes, shared memory, etc.)
  5. There is no "by reference."
Reason: