I have a dashboard indi I am using to learn mql - it basically shows every pair and a remark whether price has crossed within a moving average.
Nothing rocket operation about it, but I was using the next code and receiving incorrect results with some pairs and I figured its probably because I am utilizing Bid and this expression takes the Bid on the current chart - not the pair which its using.
Inserted Code double aMA = iMA(aPair, 0, 10, 0, 1, PRICE_CLOSE, shift); if (Bidgt;aMA) text Above else if (Bidlt;aMA) text Beneath
So, if aPair is GBPUSD for instance, and GBPUSD is the pair that is open with this chart, then the code is fine.
However if aPair is EURUSD however, the chart is open to GBPUSD, I am presuming the Bid function is receiving the Bid of GBPUSD, and not EURUSD - is this correct ?
So what can go in place of Bid, therefore it takes the price of the aPair that is passed and not the current chart.
I hope that makes sense - dont worry about the inadequate code, I am only having my first play with this.
Thx !