Ok, works.
string Prices(){ int total = 1; total = SymbolsTotal(1); string all = "Time,Open,High,Low,Close,Volume,Ask,Bid|||"; for(int i=1;i<total;i++) { string s = SymbolName(i,1); all = all +s+","+iTime(s,0,0)+","+iOpen(s,0,0)+","+iHigh(s,0,0)+","+iLow(s,0,0)+","+iClose(s,0,0)+","+iVolume(s,0,0)+","+SymbolInfoDouble(s,SYMBOL_ASK)+","+SymbolInfoDouble(s,SYMBOL_BID)+"|||"; } return all; }
Hi,
Now this doesn't work (How refresh function only on per period or OnBar)
It refresh Print every tick Why what is wrong with MT4 and Mql4 ?
string newbar = ""; void OnTick() { if(newbar != Time[0]){ newbar = Time[0]; Print(TimeToStr(Time[0], TIME_DATE|TIME_SECONDS) + " Account equity " + DoubleToString(NormalizeDouble(AccountEquity(),2),2)); Balance(); } }
datetime newbar = 0;
Thanks very much.
Ps. MQL4 can't fit as php, blah.
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, why SymbolInfoDouble() shows 0 for ask and Bid with all symbols?