In my EA I have it pulling the Ask and bid from different pairs (other than the one it is attached to) but once it pulls the information it never updates it. How do I make it so my EA always has the current bid and ask prices from other pairs?
- how do I access current bid and ask prices ?
- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- HOW CAN I GET ANOTHER PAIRS ASK AND BID PRICE ?
I'd suggest using a timeer that reads the bid as ask every millisecond and saves it into a global variable.
for the time check here:
https://docs.mql4.com/eventfunctions/eventsetmillisecondtimer
// we're ob the DJ-chart and wnt to read eurusd bid & ask double bid_eurusd = 0.0; double ask_eurusd = 0.0; int OnInit() { //--- create timer // set timer between 1 and 10 milliseconds EventSetMillisecondTimer(1); //--- return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { //--- destroy timer EventKillTimer(); } // gets invoked every millisecond void OnTimer() { //--- // asuming we're on the DJ-chart lets get EURUSD bid and ask bid_eurusd = MerketInfo("EURUSD", MODE_BID); ask_eurusd = MerketInfo("EURUSD", MODE_ASK); }

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