codemq:
I used the predefined list, but it gave 1 error that says: cannot convert enum
datetime time = iTime(_Symbol, (ENUM_TIMEFRAMES)Timeframe, 0);
thanks,
(ENUM_TIMEFRAMES)Timeframe is written anytime Timeframe is used, can it be defined once instead of writing it multiple times:
Candle1Open = NormalizeDouble(iOpen(_Symbol, (ENUM_TIMEFRAMES)Timeframe, 1), _Digits); Candle1Close = NormalizeDouble(iClose(_Symbol, (ENUM_TIMEFRAMES)Timeframe, 1), _Digits); Candle1High = NormalizeDouble(iHigh(_Symbol, (ENUM_TIMEFRAMES)Timeframe, 1), _Digits); Candle1Low = NormalizeDouble(iLow(_Symbol, (ENUM_TIMEFRAMES)Timeframe, 1), _Digits);
codemq #:
thanks,
(ENUM_TIMEFRAMES)Timeframe is written anytime Timeframe is used, can it be defined once instead of writing it multiple times:
below the input line, then, add a new line below that...
input MY_TIMEFRAME Timeframe = H4; ENUM_TIMEFRAMES tf = (ENUM_TIMEFRAMES)Timeframe; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { datetime time = iTime(_Symbol, tf, 0);
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
I used the predefined list, but it gave 1 error that says: cannot convert enum