Scanner indicator

 

Hello everyone.

I am creating a scanner.

When my scanner call customer indicator for every symbol.

then my terminal will hang.

I don't know how my scanner indicator will work with terminal hang.. please suggest . I am using 160 symbol in one scanner. And call custom indicator.

Please suggest me.


Thank you in advance.

Megha

 
Megha Relan:

Hello everyone.

I am creating a scanner.

When my scanner call customer indicator for every symbol.

then my terminal will hang.

I don't know how my scanner indicator will work with terminal hang.. please suggest . I am using 160 symbol in one scanner. And call custom indicator.

Please suggest me.


Thank you in advance.

Megha

Rewrite it.  Using iCustom() is sometimes the last choice that you want to use


It would be 23 symbols x 7 time frames x 4 indicators == 644 indicator calls (and those are not built in indicators - even though using built in indicators would not make significant difference compared to iCustom() usage in cases like this)

 

hello sir,


thank you for the response. i already use icustom but when icustom call 160 times then terminal is hang .

the code is working fine, the problem is only terminal will be hang when icustom call 

// when this function call then terminal will be hang , in  this array " availableCurrencyPairs" i have 160 symbols  

void func_IndicatorValueCheckAccToSymbol1()

{

   int tradetype = -1;

   for(int row = 0 ; row < ArraySize(availableCurrencyPairs);row++)

   {

      if(ib_UseTF1)

      {

         tradetype = func_SignalBaar(1,availableCurrencyPairs[row],eTF1);

         func_btnTextChange("SignalTF1"+availableCurrencyPairs[row] ,tradetype,9);  

      }

   }

}


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

//| Signal Check function                                                   |

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

int func_SignalBaar(int li_Shift, string symbl, ENUM_TIMEFRAMES etf)

{

   double ld_IndiValue1_1 = func_IndicatorBufferValue(symbl,etf,is_IndicatorFileName1,0,li_Shift);

   double ld_IndiValue1_2 = func_IndicatorBufferValue(symbl,etf,is_IndicatorFileName1,1,li_Shift);

  

   // this condition check for buy

   if(ld_IndiValue1_1 != 0) 

      {

         return 0;

      }

            

   // this condition check for sell

   if(ld_IndiValue1_2 != 0 )

      {

        return 1;   

      }

      return -1;

        

}


//+------------------------------------------------------------------+
//| Function to read buffer's (whose index is sent) value with a shift from current bar
//|   for selected indicator, as written in global variable, gv_IndicatorFileName
//|      and replace its EMPTY_VALUE by 0                            |
//+------------------------------------------------------------------+
double func_IndicatorBufferValue(string symbol, ENUM_TIMEFRAMES etf,string IndicatorName, int buffer_index, long index_shift)
{
   double buffer_value = iCustom(symbol,etf,IndicatorName,buffer_index,index_shift);
   
   // replace any empty buffer value by 0
   if (buffer_value == EMPTY_VALUE)
      buffer_value = 0;
   // return buffer's value
   return(buffer_value); 
}

 
Megha Relan: thank you for the response. i already use icustom but when icustom call 160 times then terminal is hang.

the code is working fine, the problem is only terminal will be hang when icustom call

You are misunderstanding or ignoring @Mladen Rakic's post. He is telling you NOT to use iCustom for this. He is telling you that it is inefficient in your case.

He is telling you that your code is NOT working fine because it is inefficient. You must rewrite your code without iCustom.

You must implement the calculations in the EA and not in the Custom Indicator.

 
Fernando Carreiro:

You are misunderstanding or ignoring @Mladen Rakic's post. He is telling you NOT to use iCustom for this. He is telling you that it is inefficient in your case.

He is telling you that your code is NOT working fine because it is inefficient. You must rewrite your code without iCustom.

You must implement the calculations in the EA and not in the Custom Indicator.

Ok sorry , my mistake. Any solution to use ex4. Actually my scanner call one indicator and that indicator call 2 more indicator... I did not know how to implement this . Please suggest . Or if possible please give me example . Thank you in advance.

Regards
Megha
 
Megha Relan: Ok sorry , my mistake. Any solution to use ex4. Actually my scanner call one indicator and that indicator call 2 more indicator... I did not know how to implement this . Please suggest . Or if possible please give me example .

If you only have ".ex?" files, then it is not possible. You will need to figure out how your scanner works and replicate its functionality or come up with your scanner code. There are many scanner examples in the  CodeBase.

 
Fernando Carreiro:

If you only have ".ex?" files, then it is not possible. You will need to figure out how your scanner works and replicate its functionality or come up with your scanner code. There are many scanner examples in the  CodeBase.

Thank you so your response.
I have source code also. But i literally don't know how to call my indicator funcationaly itself.
Ok i try again

Thanks
 
Megha Relan: I have source code also. But i literally don't know how to call my indicator funcationaly itself.
You don't "call" your Indicators functionality. You rewrite it completely within the EA code.
Reason: