now work thankz at all
void OpenCloseHighestLowestYesterday() { datetime yesterday[]; double HighPrice[], LowPrice[]; CopyTime(_Symbol,PERIOD_D1,0,1,yesterday); // CopyHigh(_Symbol,PERIOD_M30,yesterday[0],48,HighPrice); CopyLow(_Symbol,PERIOD_M30,yesterday[0],48,LowPrice); // double Lowest = MathMin(HighPrice[ArrayMinimum(HighPrice,WHOLE_ARRAY,0)],LowPrice[ArrayMinimum(LowPrice,WHOLE_ARRAY,0)]); double Highest = MathMax(HighPrice[ArrayMaximum(HighPrice,WHOLE_ARRAY,0)],LowPrice[ArrayMaximum(LowPrice,WHOLE_ARRAY,0)]); printf("*** Lowest M30 candle open/close yesterday : %g ---- Highest M30 candle open/close yesterday : %g",Lowest,Highest); }
-
double HighPrice[], LowPrice[]; CopyTime(_Symbol,PERIOD_D1,0,1,yesterday); // CopyHigh(_Symbol,PERIOD_M30,yesterday[0],48,HighPrice); CopyLow(_Symbol,PERIOD_M30,yesterday[0],48,LowPrice);
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4 - faustf: try to find highest and lowest of yesterday
int iBOY = iBarShift(NULL,0, yesterday() ); int iBOD = iBarShift(NULL,0, date() ); int nBars = iBOD - iBOY; int iHHy = iHighest(NULL,0, MODE_HIGH, nBars, iBOD+1); double HHy = High[iHHy];
Find bar of the same time one day ago - MQL4 programming forum
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
hi guys i try to find highest and lowest of yesterday i use this code but for me not work
return me worng high and lowest