DIsplaying Ask/Bid

To add comments, please log in or register
AlgoTraderKent
8
AlgoTraderKent  

Hi


Newby here on MT5....


How do I use an expert in meta editor to simply show a graph / indicator with a bid graph and an ask graph?

Before I start doing math, I want to see the spread....


Thanks in advance

Alain Verleyen
39017
Alain Verleyen  
AlgoTraderKent:

Hi


Newby here on MT5....


How do I use an expert in meta editor to simply show a graph / indicator with a bid graph and an ask graph?

Before I start doing math, I want to see the spread....


Thanks in advance

You can show the Ask line for the current price (see Chart properties : F8).

But ask price aren't save so you need to save it yourself if you want to get ask price history.

You can check the Codebase, there is probably already something similar.

rodoboss
4167
rodoboss  

Hi,try this code :

 

 

///////////////////////////////////////////////////////////////

int     init(){

return 1; 

}


void OnTick(void)

  {

  double a = Bid-Ask;

  Alert("Bid :  " + Bid + "  __ Ask  " + Ask  + "Spread:" + a);

 }

/////////////////////////////////////////////////////////////// 

To add comments, please log in or register