You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
https://www.mql5.com/en/code/16006
Examples
please correct
bool IsTesting()
Returns TRUE if an Expert Advisor is running in the testing mode, otherwise returns FALSE.
MQLInfoInteger
bool IsTesting()
MQLInfoInteger(MQL_TESTER)
Returns TRUE if an Expert Advisor is running in the testing mode, otherwise returns FALSE.
MQLInfoInteger
MQL5_TESTING dont work please change it to MQL_TESTER.
Thank you,
Your hard work in this article is very helpful :)
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.