extern string Input_Indicator ="20.0,0.0,0.0,0.0,50.0,0.0,0.0,0.0";
if (iCustom(NULL, PERIOD_CURRENT, Indicator_Name,20,0,0,0,50,0,0,0,Buffer_Sell,Shift_Buffer_Sell) != EMPTY_VALUE)
Worth mentioning that you may leave inputs field empty if you expect default entries.(It seems you want default entries)
but actually i wanna make the ICustom() can change indikator parameter input from value :
extern string Input_Indicator ="20.0,0.0,0.0,0.0,50.0,0.0,0.0,0.0";
so .. if this possible .. i can make EA from any indicator with out change mql4 code frist (if the indicator have Buffer Signal) ...
the
Then you should use IndicatorCreate instead. Check this link: https://www.mql5.com/en/forum/234571
Simply parse input string and create input parameters accordingly.
- 2018.04.07
- www.mql5.com
Then you should use IndicatorCreate instead. Check this link: https://www.mql5.com/en/forum/234571
Simply parse input string and create input parameters accordingly.
thank u , but thats mql5 .. i need for mql4
You must split the string, convert each piece to the proper datatype, and pass it through iCustom. You.
yeah .. i do it ..
string data_OP[]; int stringSplitResult_OP = StringSplit(Input_Indicator_OPorder, ',', data_OP); int dataCount_OP = ArraySize(data_OP); double indicatorValues_OP[i]; string stringValues_OP[i]; if (stringSplitResult_OP <= dataCount_OP) { for (int i = 0; i < dataCount_OP; i++) { double doubleValue = StrToDouble(data_OP[i]); int integerValue = MathRound(doubleValue); if (doubleValue == integerValue) { Print("Terdeteksi integer"); indicatorValues_OP[i] = DoubleToString(doubleValue); stringValues_OP[i] = DoubleToString(doubleValue); } else { indicatorValues_OP[i] = DoubleToString(indicatorValues_OP[i]) } } if ((iCustom(NULL, PERIOD_CURRENT, Indicator_Name_OPorder, indicatorValues_OP[i],Buffer_Signal_OPBuy, Shift_Buffer_OPBuy+1) == EMPTY_VALUE)
But the problem is.. u will stuck when meet indicator have "Type String" like this picture >>> https://telegra.ph/file/261ee54292b3c6a1a11dc.jpg <<<
im trying to
DoubleToString( indicatorValues_OP[i])
but is not working
You are not “doing it”.
- Ridwan Salahudin #:
double indicatorValues_OP[i]; string stringValues_OP[i];
Do not post code that will not even compile.
- Ridwan Salahudin #:You are passing one value not all of them.
yeah .. i do it ..
if ((iCustom(NULL, PERIOD_CURRENT, Indicator_Name_OPorder, indicatorValues_OP[i],Buffer_Signal_OPBuy, Shift_Buffer_OPBuy+1) == EMPTY_VALUE)
but is not working
You are not “doing it”.
-
Do not post code that will not even compile.
- You are passing one value not all of them.
well actually i put IndicatorValues_op[50], thats why i just have problem with string data :
But here example :
string a[10]={"0.7","650"}; double expectedCode =iCustom(Symbol(),0,"NAMEINDICATOR",a[0],a[1],0,0); Print(a[0]," X ",a[1]);
what if in the data have string data
string a[10]={"0.7","650","String Data"}; double expectedCode =iCustom(Symbol(),0,"NAMEINDICATOR",a[0],a[1],a[3],0,0); Print(a[0]," X ",a[1]," X ",a[3]);
i can't do expectedCode = DoubleToStr( expectedCode );
how can I Switch Double expectedCode to string expectedCode when in the array have string data?...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i wanna ask , how can I use value
extern string Input_Indicator ="20.0,0.0,0.0,0.0,50.0,0.0,0.0,0.0";
// I wanna give value "Input_Indicator" from the input coloumn , use comma saperated but I dont know how...
if (iCustom(NULL, PERIOD_CURRENT, Indicator_Name,Input_Indicator,Buffer_Sell,Shift_Buffer_Sell) != EMPTY_VALUE)