HOW TO Call the value of Tenken Sen from this Indicator into my EA

 

can anyone please help me?

I want the Tenken Sen value in this function:

 int signal()
  {
    int signal=2;

// i need here the codes using iCustom-----

Then something like


    if(Tanken Sen<30) signal=0;
    if(Tanken Sen>70) signal=1;
  return(signal);
  }

Thanks

 

hi paul,

please look at the indicator i posted. tenken sen is ploted as a value of rsi and not price. i think you need to use icustom to call the indicator first. any help please?

thanks

 
tsedawa:

can anyone please help me?

I want the Tenken Sen value in this function:

 int signal()
  {
    int signal=2;

// i need here the codes using iCustom-----

Then something like


    if(Tanken Sen<30) signal=0;
    if(Tanken Sen>70) signal=1;
  return(signal);
  }

Thanks

help please
 
tsedawa: // i need here the codes using iCustom-----
  1. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. Detailed explanation of iCustom - MQL4 forum
 
WHRoeder:
tsedawa: // i need here the codes using iCustom-----
  1. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. Detailed explanation of iCustom - MQL4 forum

Hi WHRoeder,

thanks a lot for your help. your second link helped me greatly. ofcourse i tried before but could not fully grasp how to call them into my ea. now i think i have understood quite well. here is how i did it. please let me know if i made any mistake. first i removed the five external strings from the indicator which i thought are not needed and then compiled it. so now i have five less externals to deal with. so i changed the name of the indicator from v2 to v3. please check

//+------------------------------------------------------------------+
 int BuyAllowed()
  {
    int BuyAllowed=0;
    double TanSen=iCustom(NULL,tf240,"Brooky_Rsi_Ichimoku_V3.mq4",9,26,52,14,0,Tenkan_Buffer,0);
    if(TanSen>67) BuyAllowed=1;
  return(BuyAllowed);
  }
//+------------------------------------------------------------------+
 int SellAllowed()
  {
    int SellAllowed=1;
    double TanSen=iCustom(NULL,tf240,"Brooky_Rsi_Ichimoku_V3.mq4",9,26,52,14,0,Tenkan_Buffer,0);
    if(TanSen<33) SellAllowed=0;
  return(SellAllowed);
  }
//+------------------------------------------------------------------+

i am wondering if these two functions can be combined into one.

Thanks

Reason: