- limit for input parameters for iCustom
- MQL4 calling a custom indicator into an EA that has 100+ input parameters
- How to know the full Indicator parameters
hi, is there a way to solve iCustom which is subject to an input limit;
I use a string to collect all input indicators from ea and sent using iCustom;
string hanName= "YBM_Signaler_y19 1.0" ; int magixea= 12345000 ; //--- int OnInit () { //--- if ( StringToTime (inpJamBuka)> StringToTime (inpJamtutup) || StringToTime (inpJamAlertBuka)> StringToTime (inpJamAlerttutup)) MessageBox ( "Action " +inpJamBuka+ " - " +inpJamtutup+ "\n" + "Alert " +inpJamAlertBuka+ " - " +inpJamAlerttutup, "BECAREFULL TIME INPUT" ); string hanConfig=magixea+ ";" + history_bars+ ";" + cond_labels+ ";" + cond_x+ ";" + cond_y+ ";" + cond_fsize+ ";" + cond_fclr+ ";" + ..................... //Many input ..................... //Many Input ma_44_use+ ";" + //1__ use ma_55_use+ ";" + //1__ use sto_55_use+ ";" + //1__ use sto_44_use+ ";" + //1__ use sto_33_use+ ";" + //1__ use sto_22_use+ ";" + //1__ use sto_11_use+ ";" + //1__ use ma_crossover+ ";" + //MA - crossover, each MA has it's own x period piv_show; //__ show hanCustom= iCustom ( Symbol (), Period (),hanName,hanConfig); if (hanCustom== INVALID_HANDLE ) return ( INIT_FAILED ); if (! ChartIndicatorAdd ( 0 , 0 ,hanCustom)) return ( INIT_FAILED ); ArraySetAsSeries (buy_buff, true ); ArraySetAsSeries (sell_buff, true ); //--- return ( INIT_SUCCEEDED ); }
And i Using StringSplit To Extern this String From eA Using New Input String:
//+------------------------------------------------------------------+ input string Ea= "" ; //Ea Config *Dont Touch*
void QnInstallEa() { string u[ 132 ]; StringSplit (Ea, ";" ,u); switch ( StringToInteger (u[ 0 ])) { case 12345000 : history_bars = StringToInteger (u[ 1 ]); //History bars cond_labels = u[ 2 ]== "true" ; //Show conditions summary? cond_x = StringToInteger (u[ 3 ]); //__ x cond_y = StringToInteger (u[ 4 ]); //__ y cond_fsize = StringToInteger (u[ 5 ]); //__ font size cond_fclr = StringToColor (u[ 6 ]); //__ font color cond_line_spacing = StringToInteger (u[ 7 ]); //__ line spacing (pixels) all_valid = u[ 8 ]== "true" ; //All valid candles? use_live = u[ 9 ]== "true" ; //Use live candle? (f=completed current tf only) pip_adjust_10 = StringToDouble (u[ 10 ]); //Pip adjustment (factor of 10s) ma_all_line_up = u[ 11 ]== "true" ; //MA - all line up (use MAs below consecutively) ............... //To many String Convert ............... //To many String Convert ma_1_use = u[ 120 ]== true ; ma_2_use = u[ 121 ]== true ; //1__ use ma_3_use = u[ 122 ]== true ; //1__ use ma_4_use = u[ 123 ]== true ; //1__ use ma_5_use = u[ 124 ]== true ; //1__ use sto_5_use = u[ 125 ]== true ; //1__ use sto_4_use = u[ 126 ]== true ; //1__ use sto_3_use = u[ 127 ]== true ; //1__ use sto_2_use = u[ 128 ]== true ; //1__ use sto_1_use = u[ 129 ]== true ; //1__ use ma_crossover = u[ 130 ]== true ; //MA - crossover, each MA has it's own x period piv_show = u[ 131 ]== true ; //__ show break ; default : QnDefault(); break ; } return ; } //+------------------------------------------------------------------+
and this result
Can Something Help me:
Thanks! I know this post is old but I wanted to reply back. Thanks for the info. I took a closer look at the inputs and fortunately the most important inputs just fit within the input limit. So I just left the others out of the iCustom function and it works fine. The left out inputs will just have to remain at default values. The developer does not want to revise his indicator.
You agree to website policy and terms of use