extern ENUM_TIMEFRAMES TFofFractalsorCandlesforTrail = PERIOD_M15;
That's better but that's not where the implicit conversion is coming from.
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
extern ENUM_TIMEFRAMES TFofFractalsorCandlesforTrail=ENUM_TIMEFRAMES (PERIOD_M15);
Period_M15 is an ENUM_TIMEFRAMES. No need for the cast.
-
if (TFofFractalsorCandlesforTrail==0)TFofFractalsorCandlesforTrail=Period();
Period() is an int. Cast it to the proper enumeration. Don't hard code numbers; zero is PERIOD_CURRENT; use the proper enumeration.
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
Period_M15 is an ENUM_TIMEFRAMES. No need for the cast.
- Period() is an int. Cast it to the proper enumeration. Don't hard code numbers; zero is PERIOD_CURRENT; use the proper enumeration.
1. Well Taken. Will Take Care.
2. Updated to:
extern ENUM_TIMEFRAMES TFofFractalsorCandlesforTrail=PERIOD_M15;
3.Updated to:
int TFofFractalsorCandlesforTrail1=TFofFractalsorCandlesforTrail; if (TFofFractalsorCandlesforTrail==PERIOD_CURRENT)TFofFractalsorCandlesforTrail1=Period();
Thanks and Credits to all of you for your quick and selfless support in troubleshooting:
1) https://www.mql5.com/en/users/thecreator1
2) https://www.mql5.com/en/users/nicholishen
3) https://www.mql5.com/en/users/whroeder1
May you all with family be infinitely blessed with lots of inner peace, love, health, abundance, prosperity.....
- www.mql5.com
int TFofFractalsorCandlesforTrail1=TFofFractalsorCandlesforTrail; if (TFofFractalsorCandlesforTrail==PERIOD_CURRENT)TFofFractalsorCandlesforTrail1=Period();
With this the warning is not anymore there. Do you feel any further improvements?
With this the warning is not anymore there. Do you feel any further improvements?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
if (TFofFractalsorCandlesforTrail==0)TFofFractalsorCandlesforTrail=Period();
MQ4:
The above code generates a warning "implicit enum conversion: warning.
Any advises on how the warning can be cleared