Advice for icustom indicator

 
Hi,

Can someone help me how I use value 1 and value 2 from QQE indicator in an ea with iCustom?
I want to use it as exit trade in ea.
V1=value1 and V2=value2 , the P= previous candle because I want to make a crossover of value1 and value 2

Did is what I did:

 double TrLevelSlow;
 double RsiMa;
 
 double V1 = iCustom (_Symbol, _Period, QQE_Indicator_Name,RsiMa, 0,0); 
 double V2 = iCustom (_Symbol, _Period, QQE_Indicator_Name, TrLevelSlow, 0,0);  
 double V1P = iCustom (_Symbol, _Period, QQE_Indicator_Name,RsiMa, 0,1); 
 double V2P = iCustom (_Symbol, _Period, QQE_Indicator_Name, TrLevelSlow, 0,1); 
   
 if (V1P > V2P && V1 < V2) OrderExit(1); //buy trade exit
 if (V1P < V2P && V1 > V2) OrderExit(0);// sell trade exit 
 

Don't double post! You already had another thread open.

          General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)