You can read my blogpost for a ready-made solution.
Thanks Stanislav Korotky for your solution, but i am not good much in MQL5 and i still don't know how to convert OBJPROP_FIRSTLEVEL to use in MQL5. i don't find the same object property to convert it
in mql4:
OBJPROP_FIRSTLEVEL+n
210+n
int
Integer value to set/get the value of Fibonacci object level with index n. Index n can be from 0 (number of levels -1), but not larger than 31
Thanks Stanislav Korotky for your solution, but i am not good much in MQL5 and i still don't know how to convert OBJPROP_FIRSTLEVEL to use in MQL5. i don't find the same object property to convert it
in mql4:
OBJPROP_FIRSTLEVEL+n
210+n
int
Integer value to set/get the value of Fibonacci object level with index n. Index n can be from 0 (number of levels -1), but not larger than 31
After this your inital MQL4 code should work as is.
I added class OBJPROP_DOUBLE_BROKER_EXTENDED to your ind4to5 include and it seems not to be working as in the latest Metaeditor build 1958 call of ObjectSetDouble(chart_ID,name,OBJPROP_PRICE1,price1) returns compilation error 'ObjectSetDouble' - no one of the overloads can be applied to the function call. Any ideas?
Hi Everyone,
do you know how to use ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value) in MQL5? i tried to search OBJPROP_FIRSTLEVEL but don't find it in MQL5
mql4:
void _SetFibLevel(string objname, int level, double value, string description)
//+------------------------------------------------------------------+
{
ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value);
ObjectSetFiboDescription(objname,level,description);
}
-----------------------------------
do you know how to use ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value) in MQL5? i tried to search OBJPROP_FIRSTLEVEL but don't find it in MQL5
mql4:
void _SetFibLevel(string objname, int level, double value, string description)
//+------------------------------------------------------------------+
{
ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value);
ObjectSetFiboDescription(objname,level,description);
}
-----------------------------------
You can read my blogpost for a ready-made solution.
You can read my blogpost for a ready-made solution.
Very useful, thanks :)
You can read my blogpost for a ready-made solution.
Thanks Stanislav Korotky for your solution, but i am not good much in MQL5 and i still don't know how to convert OBJPROP_FIRSTLEVEL to use in MQL5. i don't find the same object property to convert it
in mql4:
OBJPROP_FIRSTLEVEL+n
210+n
int
Integer value to set/get the value of Fibonacci object level with index n. Index n can be from 0 (number of levels -1), but not larger than 31
but i don't find it in MQL5
ex: MQL4 : ObjectSetFiboDescription(objname,level,description);->MQL5: ObjectSetString(0,objname,OBJPROP_LEVELTEXT,level,description);
MQL4: ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value); -> MQL5: ???
Thanks Stanislav Korotky for your solution, but i am not good much in MQL5 and i still don't know how to convert OBJPROP_FIRSTLEVEL to use in MQL5. i don't find the same object property to convert it
in mql4:
OBJPROP_FIRSTLEVEL+n
210+n
int
Integer value to set/get the value of Fibonacci object level with index n. Index n can be from 0 (number of levels -1), but not larger than 31
but i don't find it in MQL5
ex: MQL4 : ObjectSetFiboDescription(objname,level,description);->MQL5: ObjectSetString(0,objname,OBJPROP_LEVELTEXT,level,description);
MQL4: ObjectSet(objname,OBJPROP_FIRSTLEVEL+level,value); -> MQL5: ???
ah, I find it
ObjectSetDouble(0,objname,OBJPROP_LEVELVALUE,level,value);
^^
ah, I find it
ObjectSetDouble(0,objname,OBJPROP_LEVELVALUE,level,value);
^^
You can try the following addendum to my include:
After this your inital MQL4 code should work as is.
You can try the following addendum to my include:
After this your inital MQL4 code should work as is.
Now I understood how it work, Thanks Stanislav Korotky so much.
I would suggest to replace
by
Both functions return a string which makes it easier to replace it under certain conditions!
You can try the following addendum to my include:
After this your inital MQL4 code should work as is.
I added class OBJPROP_DOUBLE_BROKER_EXTENDED to your ind4to5 include and it seems not to be working as in the latest Metaeditor build 1958 call of ObjectSetDouble(chart_ID,name,OBJPROP_PRICE1,price1) returns compilation error 'ObjectSetDouble' - no one of the overloads can be applied to the function call. Any ideas?
I figured out myself that ObjectSetDouble was not included in ind4to5. I added the following code to mqh and it solved the problem.