how to get custom indicator value with EA

 

hello all, I have a custom indicator I want to make an EA with, it has 2 lines, I want to buy when one is above the other and vice versa,

however I do not want to have to have the indicator go along with the ea, ie. if I give the ea away I don't want to have to give away indicator as well so I want code for indicator in EA...

How do I do that and then save the value of each line? for example.

int double Value1 = green line of indicator

int double Value2 = Red line of indicator.

if Value1 > Value2 Buy signal, Vice Versa.


Thanks

 

You can read the buffer values by using 

iCustom()

Function, or you can just copy the logic directly into your EA.

 
austintv: however I do not want to have to have the indicator go along with the ea, ie. if I give the ea away I don't want to have to give away indicator as well so I want code for indicator in EA...
  1. Just provide the EXn, not the indicator's code.
  2. Or, make the indicator a resource in the EA and provide neither.
              Use the publicly released code - Expert Advisors and Automated Trading - MQL5 programming forum
              Resources - MQL4 programs - MQL4 Reference
Reason: