You did it just fine, except u have no value for variable e...
int e = 1; // for current bar e=0, for previous bar e=1, etc.
Next time:
Yes, that was my problem.
int e = 1; Print("Current bar for EURUSD D1: Time ", iTime(NULL,PERIOD_D1,e),", Open ", iOpen(NULL,PERIOD_D1,e),", High ", iHigh(NULL,PERIOD_D1,e),", Low ", iLow(NULL,PERIOD_D1,e),", Close ", iClose(NULL,PERIOD_D1,e),", Volume ", iVolume(NULL,PERIOD_D1,e));
Thank you for shearing!

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
Have some issues to get previous bar high price. I can not figure out how to shift it.
int e;
Print("Current bar for EURUSD D1: Time ", iTime(NULL,PERIOD_D1,e),", Open ", iOpen(NULL,PERIOD_D1,e),", High ",
iHigh(NULL,PERIOD_D1,e),", Low ", iLow(NULL,PERIOD_D1,e),", Close ",
iClose(NULL,PERIOD_D1,e),", Volume ", iVolume(NULL,PERIOD_D1,e));
return (0);